diff options
Diffstat (limited to 'lisp/acdw.el')
-rw-r--r-- | lisp/acdw.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index fdcca84..26d1494 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el | |||
@@ -94,17 +94,19 @@ If body executes without errors, MESSAGE...Done will be displayed." | |||
94 | (:success (message "%s...done" ,msg)) | 94 | (:success (message "%s...done" ,msg)) |
95 | (t (signal (car e) (cdr e))))))) | 95 | (t (signal (car e) (cdr e))))))) |
96 | 96 | ||
97 | (defun +mapc-some-buffers (func &optional predicate) | 97 | (defun +mapc-some-buffers (func &optional predicate-or-modes) |
98 | "Perform FUNC on all buffers satisfied by PREDICATE. | 98 | "Perform FUNC on all buffers satisfied by PREDICATE-OR-MODES. |
99 | By default, act on all buffers. | 99 | By default, act on all buffers. |
100 | 100 | ||
101 | Both PREDICATE and FUNC are called with no arguments, but within | 101 | Both PREDICATE-OR-MODES and FUNC are called with no arguments, |
102 | a `with-current-buffer' form on the currently-active buffer. | 102 | but within a `with-current-buffer' form on the currently-active |
103 | buffer. | ||
103 | 104 | ||
104 | As a special case, if PREDICATE is a list, it will be interpreted | 105 | As a special case, if PREDICATE-OR-MODES is a list, it will be |
105 | as a list of major modes. In this case, FUNC will only be called | 106 | interpreted as a list of major modes. In this case, FUNC will |
106 | on buffers derived from one of the modes in PREDICATE." | 107 | only be called on buffers derived from one of the modes in |
107 | (let ((pred (or predicate t))) | 108 | PREDICATE-OR-MODES." |
109 | (let ((pred (or predicate-or-modes t))) | ||
108 | (dolist (buf (buffer-list)) | 110 | (dolist (buf (buffer-list)) |
109 | (with-current-buffer buf | 111 | (with-current-buffer buf |
110 | (when (cond ((functionp pred) | 112 | (when (cond ((functionp pred) |