Mercurial > emacs
changeset 64181:331eb59e77d4
(set-visited-file-name): Report the error for "empty filename" earlier.
(kill-some-buffers): Ignore buffers already dead.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 08 Jul 2005 22:53:47 +0000 |
parents | 31e07400e56c |
children | 176ffa79bdd8 |
files | lisp/files.el |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Fri Jul 08 22:50:50 2005 +0000 +++ b/lisp/files.el Fri Jul 08 22:53:47 2005 +0000 @@ -2544,6 +2544,10 @@ (setq truename (file-truename filename)) (if find-file-visit-truename (setq filename truename)))) + (if filename + (let ((new-name (file-name-nondirectory buffer-file-name))) + (if (string= new-name "") + (error "Empty file name")))) (let ((buffer (and filename (find-buffer-visiting filename)))) (and buffer (not (eq buffer (current-buffer))) (not no-query) @@ -2557,8 +2561,6 @@ (setq buffer-file-name filename) (if filename ; make buffer name reflect filename. (let ((new-name (file-name-nondirectory buffer-file-name))) - (if (string= new-name "") - (error "Empty file name")) (if (eq system-type 'vax-vms) (setq new-name (downcase new-name))) (setq default-directory (file-name-directory buffer-file-name)) @@ -4004,7 +4006,9 @@ (while list (let* ((buffer (car list)) (name (buffer-name buffer))) - (and (not (string-equal name "")) + (and name ; Can be nil for an indirect buffer + ; if we killed the base buffer. + (not (string-equal name "")) (/= (aref name 0) ? ) (yes-or-no-p (format "Buffer %s %s. Kill? "