From c4d8c6aaade23a33df93332c3320234392749578 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 9 Oct 2015 11:12:58 +0300 Subject: [PATCH] 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 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index e2660bfab91..21cf3aec785 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 -- 2.39.2