* lisp/progmodes/perl-mode.el (perl-indent-new-calculate):
Handle forward-sexp failure. Fixes: debbugs:16985
This commit is contained in:
parent
ffcd5669d6
commit
66f50b12de
2 changed files with 12 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2014-04-02 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/perl-mode.el (perl-indent-new-calculate):
|
||||
Handle forward-sexp failure (bug#16985).
|
||||
|
||||
2014-04-02 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* menu-bar.el (menu-bar-file-menu):
|
||||
|
@ -210,6 +215,7 @@
|
|||
(electric-indent-mode): Don't mess with the global map any more.
|
||||
Don't drop the post-self-insert-hook is some buffer is still using it
|
||||
(bug#16770).
|
||||
|
||||
* bindings.el (global-map): Remove C-j binding.
|
||||
|
||||
* emacs-lisp/nadvice.el (advice--make-docstring): Try harder to find
|
||||
|
|
|
@ -854,11 +854,12 @@ changed by, or (parse-state) if line starts in a quoted string."
|
|||
(and (= (char-syntax (following-char)) ?\))
|
||||
(save-excursion
|
||||
(forward-char 1)
|
||||
(forward-sexp -1)
|
||||
(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)))))
|
||||
(when (condition-case nil (progn (forward-sexp -1) t)
|
||||
(scan-error nil))
|
||||
(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))
|
||||
|
|
Loading…
Add table
Reference in a new issue