emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master c4d8c6a: Avoid inflooping in font-lock


From: Eli Zaretskii
Subject: [Emacs-diffs] master c4d8c6a: Avoid inflooping in font-lock
Date: Fri, 09 Oct 2015 08:13:40 +0000

branch: master
commit c4d8c6aaade23a33df93332c3320234392749578
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Avoid inflooping in font-lock
    
    * lisp/font-lock.el (font-lock-extend-region-wholelines): Bind
    inhibit-field-text-motion around the call to
    line-beginning-position, to avoid inflooping.  (Bug#21615)
---
 lisp/font-lock.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index e2660bf..21cf3ae 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1166,7 +1166,9 @@ Put first the functions more likely to cause a change and 
cheaper to compute.")
   (let ((changed nil))
     (goto-char font-lock-beg)
     (unless (bolp)
-      (setq changed t font-lock-beg (line-beginning-position)))
+      (setq changed t font-lock-beg
+            (let ((inhibit-field-text-motion t))
+              (line-beginning-position))))
     (goto-char font-lock-end)
     (unless (bolp)
       (unless (eq font-lock-end



reply via email to

[Prev in Thread] Current Thread [Next in Thread]