changeset 16972:99de1dc68184

(dired-rename-file): Pass new arg to set-visited-file-name.
author Richard M. Stallman <rms@gnu.org>
date Mon, 03 Feb 1997 09:45:27 +0000
parents c1b9bc4c525b
children 39569e1b84b2
files lisp/dired-aux.el
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/dired-aux.el	Mon Feb 03 09:42:56 1997 +0000
+++ b/lisp/dired-aux.el	Mon Feb 03 09:45:27 1997 +0000
@@ -950,11 +950,8 @@
   (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))