summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2021-09-27 18:20:34 -0500
committerCase Duckworth2021-09-27 18:20:34 -0500
commita9534e1a839f5a98569d516f56e15c77146db62b (patch)
treee413e53aa757f543aef399db9492889b322507d1 /lisp
parentEnable column-number-mode (diff)
downloademacs-a9534e1a839f5a98569d516f56e15c77146db62b.tar.gz
emacs-a9534e1a839f5a98569d516f56e15c77146db62b.zip
Add circe-buffer-source
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw-consult.el23
1 files changed, 23 insertions, 0 deletions
diff --git a/lisp/acdw-consult.el b/lisp/acdw-consult.el index daad645..84a7fea 100644 --- a/lisp/acdw-consult.el +++ b/lisp/acdw-consult.el
@@ -67,4 +67,27 @@ if ripgrep is installed, otherwise `consult-grep'."
67 defuns))) 67 defuns)))
68 `(progn ,@ (nreverse defuns)))) 68 `(progn ,@ (nreverse defuns))))
69 69
70;;; Circe buffers source
71
72(require 'cl-lib)
73(autoload 'circe-server-buffers "circe")
74(autoload 'circe-server-chat-buffers "circe")
75
76(defun circe-all-buffers ()
77 (cl-loop with servers = (circe-server-buffers)
78 for server in servers
79 collect server
80 nconc
81 (with-current-buffer server
82 (cl-loop for buf in (circe-server-chat-buffers)
83 collect buf))))
84
85(defvar circe-buffer-source
86 `(:name "circe"
87 :hidden t
88 :narrow ?c
89 :category buffer
90 :state ,#'consult--buffer-state
91 :items ,(lambda () (mapcar #'buffer-name (circe-all-buffers)))))
92
70(provide 'acdw-consult) 93(provide 'acdw-consult)