If, in a function run from before-save-hook
, I want to abort the saving of a file, so that the file is not saved and the user is signaled, how can I do that? Is it possible without(without rebinding C-xC-s or doing defadvice
around save-buffer
)?
(It used to be, I think in Emacs 23, that all you had to do was (error "Bad!")
, and the file save operation would be aborted. But that does no longer work; any errors in a before-save-hook
are ignored.)