bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#69511: Restore any state after revert-buffer


From: Michael Heerdegen
Subject: bug#69511: Restore any state after revert-buffer
Date: Sun, 03 Mar 2024 03:46:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Juri Linkov <juri@linkov.net> writes:

> +  (add-hook 'revert-buffer-state-functions
> +            (lambda ()
> +              (when (bound-and-true-p outline-minor-mode)
> +                (lambda ()
> +                  (outline-minor-mode-highlight-buffer))))))

Side note: most of the time it's better to avoid to add lambdas to hooks
for several reasons (non-trivial identity checks; inspection of the
variable by the user) when possible.

Michael.





reply via email to

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