Commit 11e314fa authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(set-visited-file-name): Don't call find-buffer-visiting if filename is nil.

parent 4475c222
......@@ -1423,7 +1423,7 @@ if you wish to pass an empty string as the argument."
(setq truename (file-truename filename))
(if find-file-visit-truename
(setq filename truename))))
(let ((buffer (find-buffer-visiting filename)))
(let ((buffer (and filename (find-buffer-visiting filename))))
(and buffer (not (eq buffer (current-buffer)))
(not (y-or-n-p (message "A buffer is visiting %s; proceed? "
filename)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment