diff options
| author | Richard M. Stallman | 1994-09-24 01:27:46 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-09-24 01:27:46 +0000 |
| commit | 2aa8cc2dc5bd6a1e2ec58efee520c3658ff315f4 (patch) | |
| tree | d8830d40e3d3f30fe5da22c90774f81382931ac8 | |
| parent | 11da536332c909dc5400f38647a948bafefaa2c6 (diff) | |
| download | emacs-2aa8cc2dc5bd6a1e2ec58efee520c3658ff315f4.tar.gz emacs-2aa8cc2dc5bd6a1e2ec58efee520c3658ff315f4.zip | |
(find-alternate-file): Confirm killing buffer only if it is visiting a file.
| -rw-r--r-- | lisp/files.el | 2 |
1 files changed, 1 insertions, 1 deletions
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 | |||
| 516 | file-dir (file-name-directory file))) | 516 | file-dir (file-name-directory file))) |
| 517 | (list (read-file-name | 517 | (list (read-file-name |
| 518 | "Find alternate file: " file-dir nil nil file-name)))) | 518 | "Find alternate file: " file-dir nil nil file-name)))) |
| 519 | (and (buffer-modified-p) | 519 | (and (buffer-modified-p) (buffer-file-name) |
| 520 | ;; (not buffer-read-only) | 520 | ;; (not buffer-read-only) |
| 521 | (not (yes-or-no-p (format "Buffer %s is modified; kill anyway? " | 521 | (not (yes-or-no-p (format "Buffer %s is modified; kill anyway? " |
| 522 | (buffer-name)))) | 522 | (buffer-name)))) |