]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/perl-mode.el
Convert consecutive FSF copyright years to ranges.
[gnu-emacs] / lisp / progmodes / perl-mode.el
index 63b77fca43a10e8858309a96b72f5ce5c2e41242..9b446e49b5ca2232d7a72e4f678b9181fda01288 100644 (file)
@@ -1,7 +1,6 @@
 ;;; perl-mode.el --- Perl code editing commands for GNU Emacs
 
-;; Copyright (C) 1990, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;;   2008, 2009, 2010  Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1994, 2001-2011  Free Software Foundation, Inc.
 
 ;; Author: William F. Mann
 ;; Maintainer: FSF
@@ -360,7 +359,8 @@ The expansion is entirely correct because it uses the C preprocessor."
      (t
       ;; This is regexp like quote thingy.
       (setq char (char-after (nth 8 state)))
-      (let ((twoargs (save-excursion
+      (let ((startpos (point))
+            (twoargs (save-excursion
                        (goto-char (nth 8 state))
                        (skip-syntax-backward " ")
                        (skip-syntax-backward "w")
@@ -384,7 +384,8 @@ The expansion is entirely correct because it uses the C preprocessor."
                          (goto-char (1+ (nth 8 state)))
                          (up-list 1)
                          t)
-                     (scan-error nil))
+                      ;; In case of error, make sure we don't move backward.
+                     (scan-error (goto-char startpos) nil))
                  (not (or (nth 8 (parse-partial-sexp
                                   (point) limit nil nil state 'syntax-table))
                           ;; If we have a self-paired opener and a twoargs