diff options
author | Eli Zaretskii <eliz@gnu.org> | 2015-10-09 11:12:58 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2015-10-09 11:12:58 +0300 |
commit | c4d8c6aaade23a33df93332c3320234392749578 (patch) | |
tree | 61902062719117d2e16dd567b5ac81bdb8403aac /lisp/font-lock.el | |
parent | 9a30d6b22307aeaac008d5fbbdffd8950e86208a (diff) | |
download | emacs-c4d8c6aaade23a33df93332c3320234392749578.tar.gz |
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)
Diffstat (limited to 'lisp/font-lock.el')
-rw-r--r-- | 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 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 |