emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 932d0fd: Fix debbugs#20146


From: Alan Mackenzie
Subject: [Emacs-diffs] master 932d0fd: Fix debbugs#20146
Date: Fri, 20 Mar 2015 15:41:29 +0000

branch: master
commit 932d0fdb4fb217adb4e894b595c2294abc4fef3e
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>

    Fix debbugs#20146
    
    * font-lock.el (font-lock-extend-jit-lock-region-after-change):
    Return the calculated values, as per spec.
---
 lisp/ChangeLog    |    7 +++++++
 lisp/font-lock.el |    8 +++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ac99cd5..cecec46 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2015-03-20  Alan Mackenzie  <address@hidden>
+
+       Fix debbugs#20146
+
+       * font-lock.el (font-lock-extend-jit-lock-region-after-change):
+       Return the calculated values, as per spec.
+
 2015-03-20  Dmitry Gutov  <address@hidden>
 
        * progmodes/ruby-mode.el (ruby-font-lock-keywords): Move `at_exit'
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 6ec6c9f..1838a0f 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.



reply via email to

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