From: Nathan Trapuzzano Date: Mon, 4 Nov 2013 03:44:23 +0000 (-0500) Subject: * lisp/progmodes/cperl-mode.el (cperl-font-lock-fontify-region-function): X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~999 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec79b92bfa0b040917a8f3250fe2f819cd8d92db;p=emacs.git * 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 --- 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 (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 * 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