aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2015-03-31 09:35:42 -0400
committerStefan Monnier2015-03-31 09:35:42 -0400
commit5a7380aa271da0b38c387b14328bb5bb902efb01 (patch)
tree2d0a00e0ffd8ae87de701fb66d544028be3c4948
parent81b0eade25e57fc39f9ee75be3f5adef8af93035 (diff)
downloademacs-5a7380aa271da0b38c387b14328bb5bb902efb01.tar.gz
emacs-5a7380aa271da0b38c387b14328bb5bb902efb01.zip
* lisp/jit-lock.el (jit-lock--run-functions): Fix min/max copy&paste error.
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/jit-lock.el7
2 files changed, 6 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e50c69b8af4..df66d81f808 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
12015-03-31 Stefan Monnier <monnier@iro.umontreal.ca> 12015-03-31 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * jit-lock.el (jit-lock--run-functions): Fix min/max copy&paste error.
4
3 Let jit-lock know the result of font-lock-extend-region-functions. 5 Let jit-lock know the result of font-lock-extend-region-functions.
4 * jit-lock.el (jit-lock--run-functions): New function. 6 * jit-lock.el (jit-lock--run-functions): New function.
5 (jit-lock-fontify-now): Use it. Handle fontification bounds more 7 (jit-lock-fontify-now): Use it. Handle fontification bounds more
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index 5fe2232f0bc..0faabeb879a 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -369,8 +369,8 @@ is active."
369 ;; already run to avoid running them redundantly when we get to 369 ;; already run to avoid running them redundantly when we get to
370 ;; those chunks. 370 ;; those chunks.
371 (setq tight-beg (max (or tight-beg (point-min)) this-beg)) 371 (setq tight-beg (max (or tight-beg (point-min)) this-beg))
372 (setq tight-end (max (or tight-end (point-max)) this-end)) 372 (setq tight-end (min (or tight-end (point-max)) this-end))
373 (setq loose-beg (max loose-beg this-beg)) 373 (setq loose-beg (min loose-beg this-beg))
374 (setq loose-end (max loose-end this-end)) 374 (setq loose-end (max loose-end this-end))
375 nil))) 375 nil)))
376 `(,(min tight-beg beg) ,(max tight-end end) ,loose-beg ,loose-end))) 376 `(,(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."
417 (quit (put-text-property start next 'fontified nil) 417 (quit (put-text-property start next 'fontified nil)
418 (signal (car err) (cdr err)))))) 418 (signal (car err) (cdr err))))))
419 419
420 ;; In case we fontified more than requested, take note. 420 ;; In case we fontified more than requested, take advantage of the
421 ;; good news.
421 (when (or (< tight-beg start) (> tight-end next)) 422 (when (or (< tight-beg start) (> tight-end next))
422 (put-text-property tight-beg tight-end 'fontified t)) 423 (put-text-property tight-beg tight-end 'fontified t))
423 424