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: Invisibility bug: `invisible' vs `display' Date: Thu, 22 Feb 2007 12:27:01 +0100 Message-ID: References: <87sldbtd50.fsf@wigwam.brockman.se> <87hctraqhh.fsf@stupidchicken.com> <87hctq6eyd.fsf@wigwam.brockman.se> <861wkucyxw.fsf@lola.quinscape.zz> <87ps8e9k8e.fsf@wigwam.brockman.se> <87vehu99x7.fsf@wigwam.brockman.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1172143603 28084 80.91.229.12 (22 Feb 2007 11:26:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Feb 2007 11:26:43 +0000 (UTC) Cc: emacs-devel@gnu.org To: Daniel Brockman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 22 12:26:36 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HKC5r-0000rJ-ER for ged-emacs-devel@m.gmane.org; Thu, 22 Feb 2007 12:26:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HKC5r-0000cx-0L for ged-emacs-devel@m.gmane.org; Thu, 22 Feb 2007 06:26:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HKC5f-0000cs-HO for emacs-devel@gnu.org; Thu, 22 Feb 2007 06:26:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HKC5d-0000cf-VA for emacs-devel@gnu.org; Thu, 22 Feb 2007 06:26:23 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HKC5d-0000cc-T3 for emacs-devel@gnu.org; Thu, 22 Feb 2007 06:26:21 -0500 Original-Received: from pfepa.post.tele.dk ([195.41.46.235]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HKC5d-0003fU-9h for emacs-devel@gnu.org; Thu, 22 Feb 2007 06:26:21 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx19.adsl-dhcp.tele.dk [80.62.38.68]) by pfepa.post.tele.dk (Postfix) with SMTP id D6693FAC071; Thu, 22 Feb 2007 12:26:14 +0100 (CET) In-Reply-To: <87vehu99x7.fsf@wigwam.brockman.se> (Daniel Brockman's message of "Thu\, 22 Feb 2007 03\:57\:08 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:66607 Archived-At: Daniel Brockman writes: > When folding stretches of code, it does not make sense to > have images in between cluster all together and stick out > in spite of the invisibility of the region. That is clearly a bug. > This patch fixes the problem for me. Thank you. Mixing invisible and display properties -- with the desire to actually get the effects of the display property looks very obscure to me, and cannot image that any code is actually relying on such functionality. I think the change is safe, so I installed it. > *** old/emacs/src/xdisp.c 2006-12-30 00:29:45.000000000 +0100 > --- new/emacs/src/xdisp.c 2007-02-22 03:29:37.000000000 +0100 > *************** > *** 762,769 **** > /* Handle `face' before `display' because some sub-properties of > `display' need to know the face. */ > {&Qface, FACE_PROP_IDX, handle_face_prop}, > - {&Qdisplay, DISPLAY_PROP_IDX, handle_display_prop}, > {&Qinvisible, INVISIBLE_PROP_IDX, handle_invisible_prop}, > {&Qcomposition, COMPOSITION_PROP_IDX, handle_composition_prop}, > {NULL, 0, NULL} > }; > --- 762,769 ---- > /* Handle `face' before `display' because some sub-properties of > `display' need to know the face. */ > {&Qface, FACE_PROP_IDX, handle_face_prop}, > {&Qinvisible, INVISIBLE_PROP_IDX, handle_invisible_prop}, > + {&Qdisplay, DISPLAY_PROP_IDX, handle_display_prop}, > {&Qcomposition, COMPOSITION_PROP_IDX, handle_composition_prop}, > {NULL, 0, NULL} > }; > > I don't know enough about the display code to be able to say > whether this is a safe change, but it seems very logical to > me to handle the `invisible' property first, since invisible > text should just be skipped. > > In fact, why not move it all the way to the top of that list? It seems like the natural thing to do, but I'm not confident that it is ok to skip handling the `fontified' property. But it seems superfluous to process face properties on invisible text, so it looks safe to move Qinvisible before the Qface entry. Can anyone see any problems with that?? -- Kim F. Storm http://www.cua.dk