summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorNathan Trapuzzano <nbtrap@nbtrap.com>2013-11-03 22:44:23 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2013-11-03 22:44:23 -0500
commitec79b92bfa0b040917a8f3250fe2f819cd8d92db (patch)
treebb88ba57a4cdbc09866bcfbdc56227acb2755f1c /lisp
parent4aca7145ffb6e532ed3939950d0ed6b4efec2c6c (diff)
downloademacs-ec79b92bfa0b040917a8f3250fe2f819cd8d92db.tar.gz
* lisp/progmodes/cperl-mode.el (cperl-font-lock-fontify-region-function):
Don't infloop when expanding region over `multiline' syntax-type that begins a line. Fixes: debbugs:15778
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/progmodes/cperl-mode.el5
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9a1dc4bd13c..fb4f29befe1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-03 Nathan Trapuzzano <nbtrap@nbtrap.com> (tiny change)
+
+ * progmodes/cperl-mode.el (cperl-font-lock-fontify-region-function):
+ Don't infloop when expanding region over `multiline' syntax-type that
+ begins a line (bug#15778).
+
2013-11-04 Stefan Monnier <monnier@iro.umontreal.ca>
* rect.el (rectangle-mark-mode): Rename from rectangle-mark.
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 8a7d1e77bd2..36b05c89ea1 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -8900,8 +8900,9 @@ do extra unwind via `cperl-unwind-to-safe'."
(beginning-of-line)
(eq (get-text-property (setq beg (point)) 'syntax-type)
'multiline)))
- (if (setq beg (cperl-beginning-of-property beg 'syntax-type))
- (goto-char beg)))
+ (let ((new-beg (cperl-beginning-of-property beg 'syntax-type)))
+ (setq beg (if (= new-beg beg) nil new-beg))
+ (goto-char new-beg)))
(setq beg (point))
(goto-char end)
(while (and end