|
From: | Gregory Heytings |
Subject: | Re: font-lock-fontify-block |
Date: | Fri, 12 Mar 2021 22:09:31 +0000 |
(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))))Why do you need `save-mark-and-excursion`?
Because font-lock-fontify-region changes point. It seems that it doesn't change mark, but I'm not sure it never will, so I've used save-mark-and-excursion just in case.
[Prev in Thread] | Current Thread | [Next in Thread] |