Function: wdired-exit
wdired-exit is an interactive and byte-compiled function defined in
wdired.el.gz.
Signature
(wdired-exit)
Documentation
Exit wdired and return to dired mode.
Just return to dired mode if there are no changes. Otherwise, ask a yes-or-no question whether to save or cancel changes, and proceed depending on the answer.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/wdired.el.gz
(defun wdired-exit ()
"Exit wdired and return to dired mode.
Just return to dired mode if there are no changes. Otherwise,
ask a yes-or-no question whether to save or cancel changes,
and proceed depending on the answer."
(interactive)
(if (buffer-modified-p)
(if (y-or-n-p (format "Buffer %s modified; save changes? "
(current-buffer)))
(wdired-finish-edit)
(wdired-abort-changes))
(wdired-change-to-dired-mode)
(set-buffer-modified-p nil)
(setq buffer-undo-list nil)
(message "(No changes need to be saved)")))