# HG changeset patch # User Richard M. Stallman # Date 1120863227 0 # Node ID 331eb59e77d41b05c4fd44648099844cc09b6da4 # Parent 31e07400e56c899788ccdec36dc20e22794e61e0 (set-visited-file-name): Report the error for "empty filename" earlier. (kill-some-buffers): Ignore buffers already dead. diff -r 31e07400e56c -r 331eb59e77d4 lisp/files.el --- 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? "