From c2604a9b8632d7be52d82d14f9ba43c0c75cc423 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 3 Feb 1997 09:45:27 +0000 Subject: [PATCH] (dired-rename-file): Pass new arg to set-visited-file-name. --- lisp/dired-aux.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 86b897d6616..6c07d430df4 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -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)) -- 2.39.2