diff options
author | Case Duckworth | 2022-02-08 14:14:34 -0600 |
---|---|---|
committer | Case Duckworth | 2022-02-08 14:14:34 -0600 |
commit | 6d2d31a40e4343e36a0ed7b7d91882cd1ae3e592 (patch) | |
tree | 79e59dc597eeaa0e03dd846cd83cdbba855673d7 /lisp | |
parent | Add variable-pitch face (diff) | |
download | emacs-6d2d31a40e4343e36a0ed7b7d91882cd1ae3e592.tar.gz emacs-6d2d31a40e4343e36a0ed7b7d91882cd1ae3e592.zip |
Don't pass the buffer to PREDICATE in `+mapc-some-buffers'
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/acdw.el | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 2f4e0fc..2b3cafc 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el | |||
@@ -97,15 +97,14 @@ If body executes without errors, MESSAGE...Done will be displayed." | |||
97 | "Perform FUNC on all buffers satisfied by PREDICATE. | 97 | "Perform FUNC on all buffers satisfied by PREDICATE. |
98 | By default, act on all buffers. | 98 | By default, act on all buffers. |
99 | 99 | ||
100 | PREDICATE is a function called with one argument, the current | 100 | Both PREDICATE and FUNC are called with no arguments, but within |
101 | buffer. FUNC is called with no arguments. Both are called | 101 | a `with-current-buffer' form on the currently-active buffer." |
102 | within a `with-current-buffer' form." | ||
103 | (let ((pred (or predicate t))) | 102 | (let ((pred (or predicate t))) |
104 | (dolist (buf (buffer-list)) | 103 | (dolist (buf (buffer-list)) |
105 | (with-current-buffer buf | 104 | (with-current-buffer buf |
106 | (when (if (or (eq (car-safe pred) 'closure) | 105 | (when (if (or (eq (car-safe pred) 'closure) |
107 | (fboundp pred)) | 106 | (fboundp pred)) |
108 | (funcall pred buf) | 107 | (funcall pred) |
109 | pred) | 108 | pred) |
110 | (funcall func)))))) | 109 | (funcall func)))))) |
111 | 110 | ||
@@ -234,7 +233,9 @@ UNIT can be one of :kb, :mb, :gb, :tb, :pb, :eb, :zb, :yb; :kib, :mib, :gib, | |||
234 | (defcustom font-lock-todo-keywords '("TODO" "XXX" "FIXME" "BUG") | 233 | (defcustom font-lock-todo-keywords '("TODO" "XXX" "FIXME" "BUG") |
235 | "Keywords to highlight with `font-lock-todo-face'.") | 234 | "Keywords to highlight with `font-lock-todo-face'.") |
236 | 235 | ||
237 | (defface font-lock-todo-face '((t :inherit font-lock-warning-face)) | 236 | (defface font-lock-todo-face '((t :inherit font-lock-comment-face |
237 | :background "yellow")) | ||
238 | ;; TODO: XXX: FIXME: BUG: testing :) | ||
238 | "Face for TODO keywords.") | 239 | "Face for TODO keywords.") |
239 | 240 | ||
240 | (defun font-lock-todo-insinuate () | 241 | (defun font-lock-todo-insinuate () |
@@ -277,9 +278,17 @@ always nil; this function is mostly intended for use in init." | |||
277 | :group 'applications) | 278 | :group 'applications) |
278 | 279 | ||
279 | ;; I can never remember all the damn chat things I run, so this just does all of em. | 280 | ;; I can never remember all the damn chat things I run, so this just does all of em. |
280 | (defun chat () | 281 | (defun chat (&optional arg) |
281 | "Initiate all chat functions." | 282 | "Initiate all chat functions. |
282 | (interactive) | 283 | With optional ARG, kill all chat-related buffers first." |
284 | (interactive "P") | ||
285 | (when arg | ||
286 | (ignore-errors | ||
287 | (circe-command-GQUIT "Reconnecting") | ||
288 | (+mapc-some-buffers #'kill-buffer (lambda () (derived-mode-p 'lui-mode))) | ||
289 | (jabber-disconnect) | ||
290 | ;; XXX: Slack ? | ||
291 | )) | ||
283 | (mapc #'call-interactively chat-functions)) | 292 | (mapc #'call-interactively chat-functions)) |
284 | 293 | ||
285 | (provide 'acdw) | 294 | (provide 'acdw) |