GNU bug report logs - #33740
[PATCH] Customizable flymake mode-line indicator

Previous Next

Package: emacs;

Reported by: Andrii Kolomoiets <andreyk.mad <at> gmail.com>

Date: Fri, 14 Dec 2018 09:21:01 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 33740 <at> debbugs.gnu.org, joaotavora <at> gmail.com, andreyk.mad <at> gmail.com
Subject: Re: bug#33740: [PATCH] Customizable flymake mode-line indicator
Date: Thu, 19 Sep 2019 20:26:17 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: 33740 <at> debbugs.gnu.org,  joaotavora <at> gmail.com,  andreyk.mad <at> gmail.com
> Date: Thu, 19 Sep 2019 18:23:01 +0200
> 
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> 
> > But the code in that function could be clearer -- I don't really
> > understand why this is done at all.
> 
> 		aelt = Fassoc (elt, mode_line_proptrans_alist, Qnil);
> 		if (! NILP (aelt) && !NILP (Fequal (props, XCDR (aelt))))
> 		  {
> 		    /* AELT is what we want.  Move it to the front
> 		       without consing.  */
> 		    elt = XCAR (aelt);
> 		    mode_line_proptrans_alist
> 		      = move_elt_to_front (aelt, mode_line_proptrans_alist);
> 		  }
> 		else
> 		  {
> 		    Lisp_Object tem;
> 
> 		    /* If AELT has the wrong props, it is useless.
> 		       so get rid of it.  */
> 
> 
> Oh, this entire thing is just so that we can maintain a cache of text
> properties and avoid some consing?  And if we have a cache, then all the
> characters in the element has to have the same text properties.

Yes.

> I wonder whether all this is really warranted...

It is.  Redrawing the mode line is a very frequent redisplay thing, so
optimizing the heck out of it is justified.

That's what I meant when I said "wisely": you need to create faces in
advance, and take care to have each individual string you use to be of
a uniform face.  And don't use propertize.




This bug report was last modified 4 years and 140 days ago.

Previous Next


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