From: Richard M. Stallman Date: Tue, 26 Mar 1996 23:57:49 +0000 (+0000) Subject: (set-visited-file-name): Don't call find-buffer-visiting if filename is nil. X-Git-Tag: emacs-19.34~977 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=11e314fa730ce41891df5ad2a9777cbeb0a8ed4e;p=emacs.git (set-visited-file-name): Don't call find-buffer-visiting if filename is nil. --- 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)))