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: Eli Zaretskii
Subject: bug#69511: Restore any state after revert-buffer
Date: Sun, 03 Mar 2024 20:46:25 +0200

> From: Juri Linkov <juri@linkov.net>
> Cc: 69511@debbugs.gnu.org
> Date: Sun, 03 Mar 2024 19:55:15 +0200
> 
> >> Like Michael suggested a set of functions should be created.
> >> These functions should share the same prefix.
> >> 
> >> So the whole set of functions will be:
> >> 
> >> revert-buffer-state-functions
> >> revert-buffer-state-read-only
> >> revert-buffer-state-outlines
> >> ...
> >> 
> >> Or like the variable 'preserve-modes' hints above,
> >> the common prefix could be like this:
> >> 
> >> revert-buffer-preserve-functions
> >> revert-buffer-preserve-modes
> >> revert-buffer-preserve-read-only
> >> revert-buffer-preserve-outlines
> >> ...
> >> 
> >> Which prefix would you prefer?
> >
> > How about revert-buffer-restore- ?
> 
> "restore" would be only part of the truth,
> because these functions first save the state,
> only their second task is to restore the saved state
> afterwards.

IMO, "restore" is better than "state", because you don't really
restore any state: a buffer has no state, per se.  "Restore" is also
better than "preserve".

What is attractive in "restore" is that it is general and generic
enough to include all the meanings you have shown in your examples.
So I think "restore" is the best candidate till now.  If someone has
better suggestions, please speak up.





reply via email to

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