irc: add +circe-buffer-p

This allows us to list the circe buffers as real when they are added to
the +irc--workspace-name.
This commit is contained in:
Sean Farley 2019-01-21 17:12:59 -08:00
parent 4b8c21a34b
commit 8a0098ee52

View file

@ -117,6 +117,14 @@ playback.")
'((text-properties . (face circe-fool-face lui-do-not-track t)))))
(add-hook 'circe-message-option-functions #'+irc|circe-message-option-bot)
(defun +circe-buffer-p (buf)
"Return non-nil if BUF is a `circe-mode' buffer."
(with-current-buffer buf
(and (derived-mode-p 'circe-mode)
(eq (safe-persp-name (get-current-persp))
+irc--workspace-name))))
(add-hook 'doom-real-buffer-functions #'+circe-buffer-p)
(after! solaire-mode
;; distinguish chat/channel buffers from server buffers.
(add-hook 'circe-chat-mode-hook #'solaire-mode))