]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/cperl-mode.el (cperl-unwind-to-safe): Don't inf-loop at end
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 18 Jul 2012 09:33:09 +0000 (05:33 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 18 Jul 2012 09:33:09 +0000 (05:33 -0400)
of narrowed buffer.

Fixes: debbugs:11966
lisp/ChangeLog
lisp/progmodes/cperl-mode.el

index 1faebf5b0830319f9a7491db6e0be48a2ee3799c..1534eb2725dda0428a3ae00f35390d6c7d279b99 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-18  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/cperl-mode.el (cperl-unwind-to-safe): Don't inf-loop at end
+       of narrowed buffer (bug#11966).
+
 2012-07-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/sh-script.el (sh-syntax-propertize-function): Fix last
index 2c258fb446a35a9e756d329d056fe36887c91ae5..58cbf26496d92fa244eb6964bcdba8047721cc5d 100644 (file)
@@ -3498,7 +3498,8 @@ Works before syntax recognition is done."
     (if end
        ;; Do the same for end, going small steps
        (save-excursion
-         (while (and end (get-text-property end 'syntax-type))
+         (while (and end (< end (point-max))
+                     (get-text-property end 'syntax-type))
            (setq pos end
                  end (next-single-property-change end 'syntax-type nil (point-max)))
            (if end (progn (goto-char end)