summaryrefslogtreecommitdiff
path: root/lisp/dired-x.el
diff options
context:
space:
mode:
authorTassilo Horn <tassilo@member.fsf.org>2011-01-13 16:44:41 +0100
committerTassilo Horn <tassilo@member.fsf.org>2011-01-13 16:44:41 +0100
commitf754f8984677a1a0ab7f3b97a55891edb142e9aa (patch)
tree683764cf491454be5c983b04e85196f7c436be05 /lisp/dired-x.el
parent8b845e3b896986f55dcaf6aa3eb845663a82d3a5 (diff)
downloademacs-f754f8984677a1a0ab7f3b97a55891edb142e9aa.tar.gz
* dired-x.el (dired-omit-verbose): New defcustom that allows
disabling the omit messages. (dired-omit-expunge): Use it.
Diffstat (limited to 'lisp/dired-x.el')
-rw-r--r--lisp/dired-x.el19
1 files changed, 14 insertions, 5 deletions
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 45fdda71356..a0b3bf38c03 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -189,6 +189,12 @@ files and lock files."
:type 'regexp
:group 'dired-x)
+(defcustom dired-omit-verbose t
+ "When non-nil, show messages when omitting files.
+When nil, don't show messages."
+ :type 'boolean
+ :group 'dired-x)
+
(defcustom dired-find-subdir nil ; t is pretty near to DWIM...
"If non-nil, Dired always finds a directory in a buffer of its own.
If nil, Dired finds the directory as a subdirectory in some other buffer
@@ -613,8 +619,9 @@ This functions works by temporarily binding `dired-marker-char' to
(not dired-omit-size-limit)
(< (buffer-size) dired-omit-size-limit)
(progn
- (message "Not omitting: directory larger than %d characters."
- dired-omit-size-limit)
+ (when dired-omit-verbose
+ (message "Not omitting: directory larger than %d characters."
+ dired-omit-size-limit))
(setq dired-omit-mode nil)
nil)))
(let ((omit-re (or regexp (dired-omit-regexp)))
@@ -622,12 +629,14 @@ This functions works by temporarily binding `dired-marker-char' to
count)
(or (string= omit-re "")
(let ((dired-marker-char dired-omit-marker-char))
- (message "Omitting...")
+ (when dired-omit-verbose (message "Omitting..."))
(if (dired-mark-unmarked-files omit-re nil nil dired-omit-localp)
(progn
- (setq count (dired-do-kill-lines nil "Omitted %d line%s."))
+ (setq count (dired-do-kill-lines
+ nil
+ (if dired-omit-verbose "Omitted %d line%s." "")))
(force-mode-line-update))
- (message "(Nothing to omit)"))))
+ (when dired-omit-verbose (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