From 11e314fa730ce41891df5ad2a9777cbeb0a8ed4e Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 26 Mar 1996 23:57:49 +0000 Subject: [PATCH] (set-visited-file-name): Don't call find-buffer-visiting if filename is nil. --- lisp/files.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index f48e38cc686..584aef9f456 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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))) -- 2.39.2