(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)
(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))
(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? "