emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105999: Small perl-mode fixes.


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105999: Small perl-mode fixes.
Date: Tue, 04 Oct 2011 22:28:55 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105999
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2011-10-04 22:28:55 -0700
message:
  Small perl-mode fixes.
  
  * lisp/progmodes/perl-mode.el (perl-electric-terminator): Doc fix.
  (perl-calculate-indent): Suppress scan errors.  (Bug#2205)
modified:
  lisp/ChangeLog
  lisp/progmodes/perl-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-10-05 03:37:21 +0000
+++ b/lisp/ChangeLog    2011-10-05 05:28:55 +0000
@@ -1,3 +1,8 @@
+2011-10-05  Glenn Morris  <address@hidden>
+
+       * progmodes/perl-mode.el (perl-electric-terminator): Doc fix.
+       (perl-calculate-indent): Suppress scan errors.  (Bug#2205)
+
 2011-10-05  Leo Liu  <address@hidden>
 
        * subr.el (read-char-choice): Fix argument to buffer-live-p which

=== modified file 'lisp/progmodes/perl-mode.el'
--- a/lisp/progmodes/perl-mode.el       2011-09-28 02:19:56 +0000
+++ b/lisp/progmodes/perl-mode.el       2011-10-05 05:28:55 +0000
@@ -633,8 +633,8 @@
 
 (defalias 'electric-perl-terminator 'perl-electric-terminator)
 (defun perl-electric-terminator (arg)
-  "Insert character and adjust indentation.
-If at end-of-line, and not in a comment or a quote, correct the's indentation."
+  "Insert character and maybe adjust indentation.
+If at end-of-line, and not in a comment or a quote, correct the indentation."
   (interactive "P")
   (let ((insertpos (point)))
     (and (not arg)                     ; decide whether to indent
@@ -832,7 +832,11 @@
                  (save-excursion
                    (beginning-of-line)
                    (looking-at "\\s-+sub\\>"))
-                 (> indent-point (save-excursion (forward-sexp 1) (point))))
+                 (> indent-point (save-excursion
+                                   (condition-case nil
+                                       (forward-sexp 1)
+                                     (scan-error nil))
+                                   (point))))
        (perl-beginning-of-function))
       (while (< (point) indent-point)  ;repeat until right sexp
        (setq state (parse-partial-sexp (point) indent-point 0))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]