changeset 9048:dc5a9c83dc35

(find-alternate-file): Confirm killing buffer only if it is visiting a file.
author Richard M. Stallman <rms@gnu.org>
date Sat, 24 Sep 1994 01:27:46 +0000
parents 122d7c1a868b
children 522a9e03ca05
files lisp/files.el
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Sat Sep 24 01:16:19 1994 +0000
+++ b/lisp/files.el	Sat Sep 24 01:27:46 1994 +0000
@@ -516,7 +516,7 @@
 		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))))