]> git.eshelyaron.com Git - emacs.git/commitdiff
Display the Dired buffer as unmodified initially
authorEli Zaretskii <eliz@gnu.org>
Sat, 29 Oct 2022 13:02:35 +0000 (16:02 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 29 Oct 2022 13:02:35 +0000 (16:02 +0300)
* lisp/dired.el (dired-readin): Make sure a newly-created Dired
buffer is shown as unmodified.  (Bug#58863)

lisp/dired.el

index 85a7131570216ba9d0019f048856a58b3c4cdd5e..128770105b08fed59b5a1124615a1e6aa68ca4e0 100644 (file)
@@ -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)