From 932d0fdb4fb217adb4e894b595c2294abc4fef3e Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Fri, 20 Mar 2015 15:39:37 +0000 Subject: Fix debbugs#20146 * font-lock.el (font-lock-extend-jit-lock-region-after-change): Return the calculated values, as per spec. --- lisp/font-lock.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lisp/font-lock.el') diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 6ec6c9f1196..1838a0f02b4 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1325,11 +1325,13 @@ This function does 2 things: (when (memq 'font-lock-extend-region-wholelines font-lock-extend-region-functions) (goto-char beg) - (setq jit-lock-start (min jit-lock-start (line-beginning-position))) + (setq beg (min jit-lock-start (line-beginning-position))) (goto-char end) - (setq jit-lock-end + (setq end (max jit-lock-end - (if (bolp) (point) (line-beginning-position 2)))))))) + (if (bolp) (point) (line-beginning-position 2))))) + (setq jit-lock-start beg + jit-lock-end end)))) (defun font-lock-fontify-block (&optional arg) "Fontify some lines the way `font-lock-fontify-buffer' would. -- cgit v1.2.3-70-g09d2