]> git.eshelyaron.com Git - emacs.git/commitdiff
(dired-rename-file): Pass new arg to set-visited-file-name.
authorRichard M. Stallman <rms@gnu.org>
Mon, 3 Feb 1997 09:45:27 +0000 (09:45 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 3 Feb 1997 09:45:27 +0000 (09:45 +0000)
lisp/dired-aux.el

index 86b897d6616363b980ad2d8c454140c1ca5fded9..6c07d430df4f37fe7eb0b42c5bee31b778319b17 100644 (file)
@@ -950,11 +950,8 @@ Special value `always' suppresses confirmation.")
   (rename-file from to ok-flag)                ; error is caught in -create-files
   ;; Silently rename the visited file of any buffer visiting this file.
   (and (get-file-buffer from)
-       (save-excursion
-        (set-buffer (get-file-buffer from))
-        (let ((modflag (buffer-modified-p)))
-          (set-visited-file-name to)
-          (set-buffer-modified-p modflag))))
+       (with-current-buffer (get-file-buffer from)
+        (set-visited-file-name to nil t)))
   (dired-remove-file from)
   ;; See if it's an inserted subdir, and rename that, too.
   (dired-rename-subdir from to))