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

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

Re: Reverting but keeping undo


From: Stefan Monnier
Subject: Re: Reverting but keeping undo
Date: Thu, 30 May 2013 20:58:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> I assume this change kills off the old confirmation about reverting.

No, it doesn't.  I never made the connection between the two in
my mind.  But I think you're on to something.

FWIW, here's what I use for the revert-buffer confirmation:

(advice-add 'revert-buffer :before
            (lambda (&rest _)
              (interactive (list (not current-prefix-arg)
                                 ;; Don't request confirmation if the
                                 ;; user just hit M-x revert-buffer RET.
                                 (eq last-command-event ?\r)))
              nil))


-- Stefan




reply via email to

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