GNU bug report logs - #59828
Fundamental Mode buffers fail to keep text properties

Previous Next

Package: emacs;

Reported by: Heime <heimeborgia <at> protonmail.com>

Date: Mon, 5 Dec 2022 06:31:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #61 received at 59828-done <at> debbugs.gnu.org (full text, mbox):

From: Heime <heimeborgia <at> protonmail.com>
To: Heime <heimeborgia <at> protonmail.com>
Cc: Yuan Fu <casouri <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>,
 59828-done <at> debbugs.gnu.org
Subject: Re: bug#59828: Fundamental Mode buffers fail to keep text properties
Date: Thu, 08 Dec 2022 13:00:11 +0000
------- Original Message -------
On Wednesday, December 7th, 2022 at 12:53 AM, Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> wrote:


> ------- Original Message -------
> On Tuesday, December 6th, 2022 at 5:41 AM, Yuan Fu casouri <at> gmail.com wrote:
> 
> 
> 
> > > > > Just to clarify:
> > > > > 
> > > > > 1. If font-lock-mode is off, you should use (propertize … ‘face …)
> > > > > 2. If font-lock-mode is on, you should use (propertize … ‘font-lock-face …)
> > > 
> > > If I have a function that does the inserts, should I include the two different conditions,
> > > whether "font-lock-mode" in "off" or "on" ?
> > > 
> > > Test whether font-lock-mode is off, then use (propertize … ‘face …)
> > > Test whether font-lock-mode is on, then use (propertize … ‘font-lock-face …)
> > 
> > It depends on your use-case. If you want to be safe you can just apply both properties, then it will work no matter font-lock-mode is on or not.
> > 
> > Yuan
 
I thought the procedure is to enable "font-lock-mode", followed by  
(propertize "G" 'font-lock-face '(:foreground "black")).  Finally disabling "font-lock-mode" in that buffer.






This bug report was last modified 2 years and 166 days ago.

Previous Next


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