summaryrefslogtreecommitdiff
path: root/lisp/dired-x.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-09-06 06:56:47 +0000
committerRichard M. Stallman <rms@gnu.org>1994-09-06 06:56:47 +0000
commit8c20281f2ec7e61cee2836cc602abf9178e8b0d4 (patch)
treedd935cad310643c8c66387740427940315b6288a /lisp/dired-x.el
parent163c344b9533a89526eff85d478623189658e91b (diff)
downloademacs-8c20281f2ec7e61cee2836cc602abf9178e8b0d4.tar.gz
(dired-omit-expunge): Avoid setting buffer modified
unless it was modified before and some mark is set so `%*' won't appear in mode-line of omitted buffers.
Diffstat (limited to 'lisp/dired-x.el')
-rw-r--r--lisp/dired-x.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index f2da28e92f6..6b24f99a7df 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -3,8 +3,8 @@
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
;; Lawrence R. Dodd <dodd@roebling.poly.edu>
;; Maintainer: Lawrence R. Dodd <dodd@roebling.poly.edu>
-;; Version: 2.37
-;; Date: 1994/06/28 15:53:34
+;; Version: 2.37+
+;; Date: 1994/08/18 19:27:42
;; Keywords: dired extensions
;; Copyright (C) 1993, 1994 Free Software Foundation
@@ -575,6 +575,7 @@ This functions works by temporarily binding `dired-marker-char' to
(interactive "sOmit files (regexp): ")
(if dired-omit-files-p
(let ((omit-re (or regexp (dired-omit-regexp)))
+ (old-modified-p (buffer-modified-p))
count)
(or (string= omit-re "")
(let ((dired-marker-char dired-omit-marker-char))
@@ -585,6 +586,12 @@ This functions works by temporarily binding `dired-marker-char' to
;; Force an update of modeline.
(set-buffer-modified-p (buffer-modified-p)))
(message "(Nothing to omit)"))))
+ ;; Try to preserve modified state of buffer. So `%*' doesn't appear
+ ;; in mode-line of omitted buffers.
+ (set-buffer-modified-p (and old-modified-p
+ (save-excursion
+ (goto-char (point-min))
+ (re-search-forward dired-re-mark nil t))))
count)))
(defun dired-omit-regexp ()
@@ -1300,7 +1307,7 @@ Uses ../lisp/man.el of \\[manual-entry] fame."
(interactive)
(require 'man)
(let ((file (dired-get-filename))
- (manual-program "nroff -man -h"))
+ (manual-program "nroff -man -h"))
(Man-getpage-in-background file)))
;;; Run Info on files.