diff options
Diffstat (limited to 'lisp/progmodes/perl-mode.el')
-rw-r--r-- | lisp/progmodes/perl-mode.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index d448aec47b8..43b33aa39ae 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -721,7 +721,10 @@ changed by, or (parse-state) if line starts in a quoted string." (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)) |