From 6a8f71e7eb96d885421b16c96df125ea4c11a4aa Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Fri, 25 Feb 1994 03:24:15 +0000 Subject: [PATCH] (set-visited-file-name): Unlock the file if setting the visited file name to nil. --- lisp/files.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index aac5ebb1a64..1ca1369d250 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1151,9 +1151,8 @@ if you wish to pass an empty string as the argument." nil (expand-file-name filename)))) (or (equal filename buffer-file-name) - (null filename) (progn - (lock-buffer filename) + (and filename (lock-buffer filename)) (unlock-buffer))) (setq buffer-file-name filename) (if filename ; make buffer name reflect filename.