GNU bug report logs - #20235
25.0.50; Commit 81b0eade25e57fc39f9ee75be3f5adef8af93035 breaks font-lock

Previous Next

Package: emacs;

Reported by: Tassilo Horn <tsdh <at> gnu.org>

Date: Tue, 31 Mar 2015 07:57:02 UTC

Severity: normal

Found in version 25.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: 25.0.50;
 Commit 81b0eade25e57fc39f9ee75be3f5adef8af93035 breaks font-lock
Date: Tue, 31 Mar 2015 09:36:20 -0400
> 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))
 




This bug report was last modified 10 years and 57 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.