From: Eli Zaretskii Date: Sat, 29 Oct 2022 13:02:35 +0000 (+0300) Subject: Display the Dired buffer as unmodified initially X-Git-Tag: emacs-29.0.90~1616^2~395 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e9bdf3d4bd5aa2be7448b0f7a968af5abb058db0;p=emacs.git Display the Dired buffer as unmodified initially * lisp/dired.el (dired-readin): Make sure a newly-created Dired buffer is shown as unmodified. (Bug#58863) --- diff --git a/lisp/dired.el b/lisp/dired.el index 85a71315702..128770105b0 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1457,9 +1457,9 @@ wildcards, erases the buffer, and builds the subdir-alist anew (if (eq (car attributes) t) (set-visited-file-modtime (file-attribute-modification-time attributes)))) - (set-buffer-modified-p nil) (when dired-make-directory-clickable (dired--make-directory-clickable)) + (set-buffer-modified-p nil) ;; No need to narrow since the whole buffer contains just ;; dired-readin's output, nothing else. The hook can ;; successfully use dired functions (e.g. dired-get-filename)