diff options
| author | Stefan Monnier | 2014-04-02 15:47:50 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-04-02 15:47:50 -0400 |
| commit | 66f50b12dee4e8eff49dcc07ebbe6dcbb69ccd1e (patch) | |
| tree | a8e5337d11daff114417d27c26d458bff748c958 /lisp/progmodes | |
| parent | ffcd5669d6a71dd9450a9c45b2ea67d3ddc7c988 (diff) | |
| download | emacs-66f50b12dee4e8eff49dcc07ebbe6dcbb69ccd1e.tar.gz emacs-66f50b12dee4e8eff49dcc07ebbe6dcbb69ccd1e.zip | |
* lisp/progmodes/perl-mode.el (perl-indent-new-calculate):
Handle forward-sexp failure.
Fixes: debbugs:16985
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/perl-mode.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index d09fb59371a..3c7571e037b 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -854,11 +854,12 @@ changed by, or (parse-state) if line starts in a quoted string." | |||
| 854 | (and (= (char-syntax (following-char)) ?\)) | 854 | (and (= (char-syntax (following-char)) ?\)) |
| 855 | (save-excursion | 855 | (save-excursion |
| 856 | (forward-char 1) | 856 | (forward-char 1) |
| 857 | (forward-sexp -1) | 857 | (when (condition-case nil (progn (forward-sexp -1) t) |
| 858 | (perl-indent-new-calculate | 858 | (scan-error nil)) |
| 859 | ;; Recalculate the parsing-start, since we may have jumped | 859 | (perl-indent-new-calculate |
| 860 | ;; dangerously close (typically in the case of nested functions). | 860 | ;; Recalculate the parsing-start, since we may have jumped |
| 861 | 'virtual nil (save-excursion (perl-beginning-of-function))))) | 861 | ;; dangerously close (typically in the case of nested functions). |
| 862 | 'virtual nil (save-excursion (perl-beginning-of-function)))))) | ||
| 862 | (and (and (= (following-char) ?{) | 863 | (and (and (= (following-char) ?{) |
| 863 | (save-excursion (forward-char) (perl-hanging-paren-p))) | 864 | (save-excursion (forward-char) (perl-hanging-paren-p))) |
| 864 | (+ (or default (perl-calculate-indent parse-start)) | 865 | (+ (or default (perl-calculate-indent parse-start)) |