emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'M-o' ('facemap-keymap') has now been removed until March 10th 2021


From: Paul W. Rankin
Subject: Re: 'M-o' ('facemap-keymap') has now been removed until March 10th 2021
Date: Wed, 24 Mar 2021 22:35:01 +1000


> On 24 Mar 2021, at 10:12 pm, Gregory Heytings <gregory@heytings.org> wrote:
> 
> 
>>> Does it?  AFAICS, font-lock-unfontify-region does not "remove _all_ text 
>>> properties", it uses remove-list-of-text-properties, which "removes _some_ 
>>> properties from text", namely those of font-lock-mode.
>> 
>> Sure, you're right that it does not remove *all* text properties per se. It 
>> removes, let's say, "all that it can" which is more than "all that is 
>> intended".
>> 
> 
> Please provide a recipe to demonstrate when this actually matters.

Programs should do what they're intended to.

>>> It allows you to toggle font-lock-mode correctly, which M-x font-lock-mode 
>>> can't do.  Try the following: emacs -Q, unless, M-., M-h, M-w, C-x b RET, 
>>> M-x text-mode, C-y, M-x font-lock-mode.
>> 
>> This is again correct behaviour.  When you yank the defun from an 
>> emacs-lisp-mode buffer into a text-mode buffer, you're inserting text with 
>> (most of) its text properties, except for the property `(fontified . t)' 
>> because within the context of *this* buffer, the text properties have not 
>> been applied with font-lock-mode and so this would be false and prevent 
>> font-lock from doing its work.
>> 
> 
> This is not the problem here.  The problem is that M-x font-lock-mode (last 
> part of the recipe) is supposed to turn font-lock-mode off, yet the 
> font-lock-mode fontification remains.

I have quite fully explained how that is not the case as per your examples. The 
"font-lock-mode fontification" does not remain, only text properties that are 
not added by font-lock remain, and as such why should turning off font-lock 
remove these? As previously noted, you are confusing text properties and 
font-lock. Font-lock is only one method to manipulate text properties.

Please read the Elisp Info manual chapters on Font Lock and Text Properties.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]