mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-18 19:07:34 +00:00
(find-alternate-file): Confirm killing buffer only if it is visiting a file.
This commit is contained in:
parent
11da536332
commit
2aa8cc2dc5
1 changed files with 1 additions and 1 deletions
|
|
@ -516,7 +516,7 @@ If the current buffer now contains an empty file that you just visited
|
|||
file-dir (file-name-directory file)))
|
||||
(list (read-file-name
|
||||
"Find alternate file: " file-dir nil nil file-name))))
|
||||
(and (buffer-modified-p)
|
||||
(and (buffer-modified-p) (buffer-file-name)
|
||||
;; (not buffer-read-only)
|
||||
(not (yes-or-no-p (format "Buffer %s is modified; kill anyway? "
|
||||
(buffer-name))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue