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: Gregory Heytings
Subject: Re: 'M-o' ('facemap-keymap') has now been removed until March 10th 2021
Date: Wed, 24 Mar 2021 13:01:53 +0000


Please provide a recipe to demonstrate when this actually matters.

Programs should do what they're intended to.


That's not a recipe... and what you think is intended is perhaps not what I intended.


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.


Apparently we're miscommunicating. When the current command is used to turn font lock off with a prefix argument, it does something equivalent to "C-x x f M-x font-lock-mode", that is, it first updates the fontification of the buffer to make it correspond to the mode, then turns font-lock-mode off (which removes the fontification that was just added). That's the "do what I mean": when I turn font-lock-mode off in a buffer, I want to remove the fontification.

In other words, it should be equivalent to the following:

(defun font-lock-update (&optional arg)
  "Updates the syntax highlighting in this buffer.
Refontify the accessible portion of the buffer, or enable Font Lock mode
if it is disabled.  With prefix ARG, toggle Font Lock mode."
  (interactive "P")
  (save-excursion
    (font-lock-fontify-region (point-min) (point-max))
    (if (or arg (not font-lock-mode))
        (font-lock-mode 'toggle))))

except that this one is much slower.



reply via email to

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