diff options
| author | Richard M. Stallman | 1994-09-06 06:56:47 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-09-06 06:56:47 +0000 |
| commit | 9b5ef74bbbcb53f65c4b92eab01896ff4dc06892 (patch) | |
| tree | dfd3dbed57cd17a0e10dc94e82dc55e000d1f93a | |
| parent | fed7c77a18fa93dae47248a84c1bd983cd421af4 (diff) | |
| download | emacs-9b5ef74bbbcb53f65c4b92eab01896ff4dc06892.tar.gz emacs-9b5ef74bbbcb53f65c4b92eab01896ff4dc06892.zip | |
(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.
| -rw-r--r-- | lisp/dired-x.el | 13 |
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 @@ | |||
| 3 | ;; Author: Sebastian Kremer <sk@thp.uni-koeln.de> | 3 | ;; Author: Sebastian Kremer <sk@thp.uni-koeln.de> |
| 4 | ;; Lawrence R. Dodd <dodd@roebling.poly.edu> | 4 | ;; Lawrence R. Dodd <dodd@roebling.poly.edu> |
| 5 | ;; Maintainer: Lawrence R. Dodd <dodd@roebling.poly.edu> | 5 | ;; Maintainer: Lawrence R. Dodd <dodd@roebling.poly.edu> |
| 6 | ;; Version: 2.37 | 6 | ;; Version: 2.37+ |
| 7 | ;; Date: 1994/06/28 15:53:34 | 7 | ;; Date: 1994/08/18 19:27:42 |
| 8 | ;; Keywords: dired extensions | 8 | ;; Keywords: dired extensions |
| 9 | 9 | ||
| 10 | ;; Copyright (C) 1993, 1994 Free Software Foundation | 10 | ;; Copyright (C) 1993, 1994 Free Software Foundation |
| @@ -575,6 +575,7 @@ This functions works by temporarily binding `dired-marker-char' to | |||
| 575 | (interactive "sOmit files (regexp): ") | 575 | (interactive "sOmit files (regexp): ") |
| 576 | (if dired-omit-files-p | 576 | (if dired-omit-files-p |
| 577 | (let ((omit-re (or regexp (dired-omit-regexp))) | 577 | (let ((omit-re (or regexp (dired-omit-regexp))) |
| 578 | (old-modified-p (buffer-modified-p)) | ||
| 578 | count) | 579 | count) |
| 579 | (or (string= omit-re "") | 580 | (or (string= omit-re "") |
| 580 | (let ((dired-marker-char dired-omit-marker-char)) | 581 | (let ((dired-marker-char dired-omit-marker-char)) |
| @@ -585,6 +586,12 @@ This functions works by temporarily binding `dired-marker-char' to | |||
| 585 | ;; Force an update of modeline. | 586 | ;; Force an update of modeline. |
| 586 | (set-buffer-modified-p (buffer-modified-p))) | 587 | (set-buffer-modified-p (buffer-modified-p))) |
| 587 | (message "(Nothing to omit)")))) | 588 | (message "(Nothing to omit)")))) |
| 589 | ;; Try to preserve modified state of buffer. So `%*' doesn't appear | ||
| 590 | ;; in mode-line of omitted buffers. | ||
| 591 | (set-buffer-modified-p (and old-modified-p | ||
| 592 | (save-excursion | ||
| 593 | (goto-char (point-min)) | ||
| 594 | (re-search-forward dired-re-mark nil t)))) | ||
| 588 | count))) | 595 | count))) |
| 589 | 596 | ||
| 590 | (defun dired-omit-regexp () | 597 | (defun dired-omit-regexp () |
| @@ -1300,7 +1307,7 @@ Uses ../lisp/man.el of \\[manual-entry] fame." | |||
| 1300 | (interactive) | 1307 | (interactive) |
| 1301 | (require 'man) | 1308 | (require 'man) |
| 1302 | (let ((file (dired-get-filename)) | 1309 | (let ((file (dired-get-filename)) |
| 1303 | (manual-program "nroff -man -h")) | 1310 | (manual-program "nroff -man -h")) |
| 1304 | (Man-getpage-in-background file))) | 1311 | (Man-getpage-in-background file))) |
| 1305 | 1312 | ||
| 1306 | ;;; Run Info on files. | 1313 | ;;; Run Info on files. |