From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: jit-lock called at EOB? Date: Fri, 29 Sep 2006 13:11:42 +0200 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1159528397 305 80.91.229.2 (29 Sep 2006 11:13:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Sep 2006 11:13:17 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 29 13:13:15 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GTGIg-00060X-1c for ged-emacs-devel@m.gmane.org; Fri, 29 Sep 2006 13:13:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GTGIf-0001za-9d for ged-emacs-devel@m.gmane.org; Fri, 29 Sep 2006 07:13:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GTGIP-0001w4-U5 for emacs-devel@gnu.org; Fri, 29 Sep 2006 07:12:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GTGIO-0001tl-8Y for emacs-devel@gnu.org; Fri, 29 Sep 2006 07:12:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GTGIO-0001tb-1A for emacs-devel@gnu.org; Fri, 29 Sep 2006 07:12:44 -0400 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GTGNg-00074q-Ad for emacs-devel@gnu.org; Fri, 29 Sep 2006 07:18:12 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepa.post.tele.dk (Postfix) with SMTP id 902E2FAC074; Fri, 29 Sep 2006 13:12:36 +0200 (CEST) Original-To: Stefan Monnier In-Reply-To: (Stefan Monnier's message of "Thu\, 28 Sep 2006 10\:30\:15 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60305 Archived-At: Stefan Monnier writes: > The recent problems of "looping in jit-lock / redisplay" seem to be caused > by the fact that every redisplay will call jit-lock at EOB because the > text-property value of `fontified' at EOB is always nil (this is because > get-text-property treats requests at EOB specially: there is no char there, > so there can't be a property either, but instead of signalling an error it > returns nil). > > I've worked around this problem now in jit-lock by ignoring requests to > fontify empty regions of text, but I believe the real bug is in the C code > which shouldn't call jit-lock at all. So I suggest the patch below. > > Any objection? Looks good to me. > > > Stefan > > > --- xdisp.c 22 sep 2006 11:15:42 -0400 1.1122 > +++ xdisp.c 28 sep 2006 10:28:50 -0400 > @@ -3246,7 +3246,9 @@ > && !NILP (Vrun_hooks) > && (pos = make_number (IT_CHARPOS (*it)), > prop = Fget_char_property (pos, Qfontified, Qnil), > - NILP (prop))) > + /* Ignore the special cased nil value always present at EOB since > + no amount of fontifying will be able to change it. */ > + NILP (prop) && IT_CHARPOS (*it) < Z)) > { > int count = SPECPDL_INDEX (); > Lisp_Object val; -- Kim F. Storm http://www.cua.dk