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
;; 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)))
(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))