diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-07-18 05:33:09 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-07-18 05:33:09 -0400 |
commit | 95bdccb782fbeb97cc2cc12a64635d6d5f85475f (patch) | |
tree | 3a36a3db589494318de6d586eae1a47ae82b3274 | |
parent | fbf31a9c2c08c86a7ab490cb7b920245b829a61d (diff) | |
download | emacs-95bdccb782fbeb97cc2cc12a64635d6d5f85475f.tar.gz |
* lisp/progmodes/cperl-mode.el (cperl-unwind-to-safe): Don't inf-loop at end
of narrowed buffer.
Fixes: debbugs:11966
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/progmodes/cperl-mode.el | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1faebf5b083..1534eb2725d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 2c258fb446a..58cbf26496d 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -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) |