aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2011-10-04 22:28:55 -0700
committerGlenn Morris2011-10-04 22:28:55 -0700
commit8943cfb0c8a7e2c4bcbca20dc5d4a68e4a0eb4e6 (patch)
tree90cc3eff53dd7d963844186e0cd62beb7051760c /lisp
parent647ab96713f36faae9509246c418edfa31a569fe (diff)
downloademacs-8943cfb0c8a7e2c4bcbca20dc5d4a68e4a0eb4e6.tar.gz
emacs-8943cfb0c8a7e2c4bcbca20dc5d4a68e4a0eb4e6.zip
Small perl-mode fixes.
* lisp/progmodes/perl-mode.el (perl-electric-terminator): Doc fix. (perl-calculate-indent): Suppress scan errors. (Bug#2205)
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/perl-mode.el10
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 @@
12011-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
12011-10-05 Leo Liu <sdl.web@gmail.com> 62011-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.
637If at end-of-line, and not in a comment or a quote, correct the's indentation." 637If 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))