From f345dd91b6d8cbece44616dcf72c00d26af14d0c Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 11 Jul 2022 20:00:04 -0500 Subject: 2022-07-11 --- lisp/acdw.el | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'lisp/acdw.el') 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." (:success (message "%s...done" ,msg)) (t (signal (car e) (cdr e))))))) -(defun +mapc-some-buffers (func &optional predicate) - "Perform FUNC on all buffers satisfied by PREDICATE. +(defun +mapc-some-buffers (func &optional predicate-or-modes) + "Perform FUNC on all buffers satisfied by PREDICATE-OR-MODES. By default, act on all buffers. -Both PREDICATE and FUNC are called with no arguments, but within -a `with-current-buffer' form on the currently-active buffer. +Both PREDICATE-OR-MODES and FUNC are called with no arguments, +but within a `with-current-buffer' form on the currently-active +buffer. -As a special case, if PREDICATE is a list, it will be interpreted -as a list of major modes. In this case, FUNC will only be called -on buffers derived from one of the modes in PREDICATE." - (let ((pred (or predicate t))) +As a special case, if PREDICATE-OR-MODES is a list, it will be +interpreted as a list of major modes. In this case, FUNC will +only be called on buffers derived from one of the modes in +PREDICATE-OR-MODES." + (let ((pred (or predicate-or-modes t))) (dolist (buf (buffer-list)) (with-current-buffer buf (when (cond ((functionp pred) -- cgit 1.4.1-21-gabe81