]> git.eshelyaron.com Git - emacs.git/commitdiff
(set-visited-file-name): Avoid calling file-name-nondirectory with a
authorLuc Teirlinck <teirllm@auburn.edu>
Sun, 10 Jul 2005 14:42:02 +0000 (14:42 +0000)
committerLuc Teirlinck <teirllm@auburn.edu>
Sun, 10 Jul 2005 14:42:02 +0000 (14:42 +0000)
nil argument.

lisp/files.el

index 029800781ba9dae6f9fd24e28e8f8e20f5420dd4..f41a9b2952221f723f049c0c6227b4e46997a7f9 100644 (file)
@@ -2545,7 +2545,7 @@ the old visited file has been renamed to the new name FILENAME."
          (if find-file-visit-truename
              (setq filename truename))))
     (if filename
-       (let ((new-name (file-name-nondirectory buffer-file-name)))
+       (let ((new-name (file-name-nondirectory filename)))
          (if (string= new-name "")
              (error "Empty file name"))))
     (let ((buffer (and filename (find-buffer-visiting filename))))