bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#20235: 25.0.50; Commit 81b0eade25e57fc39f9ee75be3f5adef8af93035 brea


From: Stefan Monnier
Subject: bug#20235: 25.0.50; Commit 81b0eade25e57fc39f9ee75be3f5adef8af93035 breaks font-lock
Date: Tue, 31 Mar 2015 09:36:20 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> With the above mentioned commit, font-lock is broken.  Finding some
> source file (no matter if elisp, ruby or what else), only the beginning
> of the buffer is fontified, the remainder is not and will not be
> fontified.

Sorry, I just installed the patch below which should fix it,


        Stefan


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]