]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/cperl-mode.el (cperl-font-lock-fontify-region-function):
authorNathan Trapuzzano <nbtrap@nbtrap.com>
Mon, 4 Nov 2013 03:44:23 +0000 (22:44 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 4 Nov 2013 03:44:23 +0000 (22:44 -0500)
Don't infloop when expanding region over `multiline' syntax-type that
begins a line.

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

index 9a1dc4bd13c33cef799a145fe9177ee1f407dfa9..fb4f29befe11cbefb52b6d9efff2b1fd855b92dd 100644 (file)
@@ -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.
index 8a7d1e77bd22f6a192ace21d48a8ed032bcbac73..36b05c89ea1587bb471fe0ec37026bea4adbefa4 100644 (file)
@@ -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