diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/perl-mode.el | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index decb66eea09..75bad939583 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-10-05 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * progmodes/perl-mode.el (perl-electric-terminator): Doc fix. | ||
| 4 | (perl-calculate-indent): Suppress scan errors. (Bug#2205) | ||
| 5 | |||
| 1 | 2011-10-05 Leo Liu <sdl.web@gmail.com> | 6 | 2011-10-05 Leo Liu <sdl.web@gmail.com> |
| 2 | 7 | ||
| 3 | * subr.el (read-char-choice): Fix argument to buffer-live-p which | 8 | * subr.el (read-char-choice): Fix argument to buffer-live-p which |
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 933f004bb5d..f051b49fe2a 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -633,8 +633,8 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'." | |||
| 633 | 633 | ||
| 634 | (defalias 'electric-perl-terminator 'perl-electric-terminator) | 634 | (defalias 'electric-perl-terminator 'perl-electric-terminator) |
| 635 | (defun perl-electric-terminator (arg) | 635 | (defun perl-electric-terminator (arg) |
| 636 | "Insert character and adjust indentation. | 636 | "Insert character and maybe adjust indentation. |
| 637 | If at end-of-line, and not in a comment or a quote, correct the's indentation." | 637 | If at end-of-line, and not in a comment or a quote, correct the indentation." |
| 638 | (interactive "P") | 638 | (interactive "P") |
| 639 | (let ((insertpos (point))) | 639 | (let ((insertpos (point))) |
| 640 | (and (not arg) ; decide whether to indent | 640 | (and (not arg) ; decide whether to indent |
| @@ -832,7 +832,11 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'." | |||
| 832 | (save-excursion | 832 | (save-excursion |
| 833 | (beginning-of-line) | 833 | (beginning-of-line) |
| 834 | (looking-at "\\s-+sub\\>")) | 834 | (looking-at "\\s-+sub\\>")) |
| 835 | (> indent-point (save-excursion (forward-sexp 1) (point)))) | 835 | (> indent-point (save-excursion |
| 836 | (condition-case nil | ||
| 837 | (forward-sexp 1) | ||
| 838 | (scan-error nil)) | ||
| 839 | (point)))) | ||
| 836 | (perl-beginning-of-function)) | 840 | (perl-beginning-of-function)) |
| 837 | (while (< (point) indent-point) ;repeat until right sexp | 841 | (while (< (point) indent-point) ;repeat until right sexp |
| 838 | (setq state (parse-partial-sexp (point) indent-point 0)) | 842 | (setq state (parse-partial-sexp (point) indent-point 0)) |