emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 5a7380a: * lisp/jit-lock.el (jit-lock--run-function


From: Stefan Monnier
Subject: [Emacs-diffs] master 5a7380a: * lisp/jit-lock.el (jit-lock--run-functions): Fix min/max copy&paste error.
Date: Tue, 31 Mar 2015 13:35:47 +0000

branch: master
commit 5a7380aa271da0b38c387b14328bb5bb902efb01
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * lisp/jit-lock.el (jit-lock--run-functions): Fix min/max copy&paste error.
---
 lisp/ChangeLog   |    2 ++
 lisp/jit-lock.el |    7 ++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e50c69b..df66d81 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
 2015-03-31  Stefan Monnier  <address@hidden>
 
+       * jit-lock.el (jit-lock--run-functions): Fix min/max copy&paste error.
+
        Let jit-lock know the result of font-lock-extend-region-functions.
        * jit-lock.el (jit-lock--run-functions): New function.
        (jit-lock-fontify-now): Use it.  Handle fontification bounds more
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index 5fe2232..0faabeb 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -369,8 +369,8 @@ is active."
          ;; already run to avoid running them redundantly when we get to
          ;; those chunks.
          (setq tight-beg (max (or tight-beg (point-min)) this-beg))
-         (setq tight-end (max (or tight-end (point-max)) this-end))
-         (setq loose-beg (max loose-beg this-beg))
+         (setq tight-end (min (or tight-end (point-max)) this-end))
+         (setq loose-beg (min loose-beg this-beg))
          (setq loose-end (max loose-end this-end))
          nil)))
     `(,(min tight-beg beg) ,(max tight-end end) ,loose-beg ,loose-end)))
@@ -417,7 +417,8 @@ Defaults to the whole buffer.  END can be out of bounds."
                    (quit (put-text-property start next 'fontified nil)
                          (signal (car err) (cdr err))))))
 
-             ;; In case we fontified more than requested, take note.
+             ;; In case we fontified more than requested, take advantage of the
+             ;; good news.
              (when (or (< tight-beg start) (> tight-end next))
                (put-text-property tight-beg tight-end 'fontified t))
 



reply via email to

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