emacs-devel
[Top][All Lists]
Advanced

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

Re: font-lock-fontify-block


From: Gregory Heytings
Subject: Re: font-lock-fontify-block
Date: Fri, 12 Mar 2021 17:50:40 +0000


Now I'm totally puzzled. emacs -Q, "unless", M-., M-x font-lock-mode: the whole buffer is unfontified. What am I missing?

Running font-lock-fontify-block and then edit the now fontified text?


What I proposed was under the assumption that font-lock-fontify-block was (about to be) obsolete(d). But you are correct, I got the condition wrong:

(defun font-lock-update (&optional arg)
  (interactive "P")
  (save-mark-and-excursion
    (if (and (not arg) font-lock-mode)
        (font-lock-fontify-region (point-min) (point-max))
      (font-lock-unfontify-region (point-min) (point-max))
      (font-lock-mode 'toggle))))
(global-set-key (kbd "C-x x f") 'font-lock-update)



reply via email to

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