]> git.eshelyaron.com Git - emacs.git/commitdiff
(dired-revert): If buffer is marked unmodified before
authorLuc Teirlinck <teirllm@auburn.edu>
Fri, 11 Jun 2004 22:38:52 +0000 (22:38 +0000)
committerLuc Teirlinck <teirllm@auburn.edu>
Fri, 11 Jun 2004 22:38:52 +0000 (22:38 +0000)
reverting, keep it marked unmodified.
Adapt to new conventions for commenting out code.
(dired-make-relative): Adapt to new conventions for commenting out code.

lisp/ChangeLog
lisp/dired.el

index 6dcc5c8fbbe1d81d57878c07c7ae2435fd37d7fb..b448338fec1b574dfd036226b02e06c9532d0b21 100644 (file)
@@ -1,3 +1,11 @@
+2004-06-11  Luc Teirlinck  <teirllm@auburn.edu>
+
+       * dired.el (dired-revert): If buffer is marked unmodified before
+       reverting, keep it marked unmodified.
+       Adapt to new conventions for commenting out code.
+       (dired-make-relative): Adapt to new conventions for commenting out
+       code.
+
 2004-06-10  Miles Bader  <miles@gnu.ai.mit.edu>
 
        * eshell/esh-module.el (eshell-load-defgroups): Bind
index 3d3fd34b5ac5d61afcc4a8c99134c18587e95a73..e5e23dfe2d6b479a8a9267279543ad77a462c6b9 100644 (file)
@@ -880,7 +880,8 @@ Must also be called after dired-actual-switches have changed.
 Should not fail even on completely garbaged buffers.
 Preserves old cursor, marks/flags, hidden-p."
   (widen)                              ; just in case user narrowed
-  (let ((opoint (point))
+  (let ((modflag (buffer-modified-p))
+       (opoint (point))
        (ofile (dired-get-filename nil t))
        (mark-alist nil)                ; save marked files
        (hidden-subdirs (dired-remember-hidden))
@@ -907,9 +908,10 @@ Preserves old cursor, marks/flags, hidden-p."
     (save-excursion                    ; hide subdirs that were hidden
       (dolist (dir hidden-subdirs)
        (if (dired-goto-subdir dir)
-           (dired-hide-subdir 1)))))
+           (dired-hide-subdir 1))))
+    (unless modflag (restore-buffer-modified-p nil)))
   ;; outside of the let scope
-;;; Might as well not override the user if the user changed this.
+;;;  Might as well not override the user if the user changed this.
 ;;;  (setq buffer-read-only t)
   )
 
@@ -1707,7 +1709,7 @@ DIR must be a directory name, not a file name."
       (setq dir (expand-file-name dir)))
   (if (string-match (concat "^" (regexp-quote dir)) file)
       (substring file (match-end 0))
-;;; (or no-error
+;;;  (or no-error
 ;;;    (error "%s: not in directory tree growing at %s" file dir))
     file))
 \f