From 2aa8cc2dc5bd6a1e2ec58efee520c3658ff315f4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 24 Sep 1994 01:27:46 +0000 Subject: [PATCH] (find-alternate-file): Confirm killing buffer only if it is visiting a file. --- lisp/files.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index 93467439621..f4766bc1760 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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)))) -- 2.39.5