unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Tassilo Horn <tsdh@gnu.org>
Cc: 20235@debbugs.gnu.org
Subject: bug#20235: 25.0.50; Commit 81b0eade25e57fc39f9ee75be3f5adef8af93035 breaks font-lock
Date: Tue, 31 Mar 2015 09:36:20 -0400	[thread overview]
Message-ID: <jwvvbhh70i1.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <87oan9lhwk.fsf@gnu.org> (Tassilo Horn's message of "Tue, 31 Mar 2015 09:56:11 +0200")

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





  parent reply	other threads:[~2015-03-31 13:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31  7:56 bug#20235: 25.0.50; Commit 81b0eade25e57fc39f9ee75be3f5adef8af93035 breaks font-lock Tassilo Horn
2015-03-31 12:02 ` Eli Zaretskii
2015-03-31 12:44   ` Tassilo Horn
2015-03-31 13:36 ` Stefan Monnier [this message]
2015-03-31 21:04   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvvbhh70i1.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=20235@debbugs.gnu.org \
    --cc=tsdh@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).