25 Jul 2011 15:48
what does "flush changes" mean
Stephen Eglen <S.J.Eglen <at> damtp.cam.ac.uk>
2011-07-25 13:48:53 GMT
2011-07-25 13:48:53 GMT
Due to a bug in another elisp program, I seemed to have been put into a
message buffer which was editable, and I edited by mistake. When I went
to revisit the folder where that file was kept, I was sasked whether to
"flush changes?". I had no idea whether that meant to discard or keep
my accidental changes, due to my perceived ambiguity of the word
"flush". Could "flush changes?" be changed to either "Discard changes?" or
"Keep changes?"
Stephen
(defun mh-unvisit-file ()
"Separate current buffer from the message file it was visiting."
(or (not (buffer-modified-p))
(null buffer-file-name) ;we've been here before
(yes-or-no-p (format "Message %s modified; flush changes? "
(file-name-nondirectory buffer-file-name)))
(error "Flushing changes not confirmed"))
(clear-visited-file-modtime)
(unlock-buffer)
(setq buffer-file-name nil))
------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide. Store less, Store more with what you own, Move data to
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
RSS Feed