changeset 69948:6b919f4beee5

(perl-indent-new-calculate): Recompute parse-start after jumping backward by a whole sexp.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 12 Apr 2006 05:11:12 +0000
parents 9abea3d88eac
children d0312c3f2374
files lisp/ChangeLog lisp/progmodes/perl-mode.el
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Apr 12 03:32:48 2006 +0000
+++ b/lisp/ChangeLog	Wed Apr 12 05:11:12 2006 +0000
@@ -1,3 +1,8 @@
+2006-04-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* progmodes/perl-mode.el (perl-indent-new-calculate):
+	Recompute parse-start after jumping backward by a whole sexp.
+
 2006-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* vc.el (vc-ensure-vc-buffer): Only change current-buffer, not the
--- a/lisp/progmodes/perl-mode.el	Wed Apr 12 03:32:48 2006 +0000
+++ b/lisp/progmodes/perl-mode.el	Wed Apr 12 05:11:12 2006 +0000
@@ -721,7 +721,10 @@
 	(save-excursion
 	  (forward-char 1)
 	  (forward-sexp -1)
-	  (perl-indent-new-calculate 'virtual nil parse-start)))
+	  (perl-indent-new-calculate
+           ;; Recalculate the parsing-start, since we may have jumped
+           ;; dangerously close (typically in the case of nested functions).
+           'virtual nil (save-excursion (perl-beginning-of-function)))))
    (and (and (= (following-char) ?{)
 	     (save-excursion (forward-char) (perl-hanging-paren-p)))
 	(+ (or default (perl-calculate-indent parse-start))