]> code.delx.au - gnu-emacs/commitdiff
* lisp/jit-lock.el (jit-lock--run-functions): Fix min/max copy&paste error.
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 31 Mar 2015 13:35:42 +0000 (09:35 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 31 Mar 2015 13:35:42 +0000 (09:35 -0400)
lisp/ChangeLog
lisp/jit-lock.el

index e50c69b8af4ef3b7fa0f338d1ff99ae94865f5f1..df66d81f808f8c904589711915631656d5385bfa 100644 (file)
@@ -1,5 +1,7 @@
 2015-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * 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
index 5fe2232f0bc1347165b2e9dbfb81cb6b8aedbafe..0faabeb879ad44145fb75ef9c3ee3991663880a2 100644 (file)
@@ -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))