summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw.el30
1 files changed, 23 insertions, 7 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 99e5c1e..d7b25c7 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -277,18 +277,34 @@ always nil; this function is mostly intended for use in init."
277 :type '(repeat function) 277 :type '(repeat function)
278 :group 'applications) 278 :group 'applications)
279 279
280(defun chat-disconnect ()
281 "Disconnect from all chats."
282 (interactive)
283 (ignore-errors
284 (circe-command-GQUIT "☮ 🫀 🍞"))
285 (ignore-errors
286 (jabber-disconnect))
287 (dolist (team +slack-teams)
288 (ignore-errors
289 (slack-team-disconnect team)))
290 (ignore-errors (slack-ws-close))
291 (+mapc-some-buffers (lambda () "Remove the buffer from tracking and kill it unconditionally."
292 (let ((kill-buffer-query-functions nil))
293 (tracking-remove-buffer (current-buffer))
294 (kill-buffer)))
295 (lambda () "Return t if derived from the following modes."
296 (derived-mode-p 'lui-mode
297 'jabber-chat-mode
298 'jabber-roster-mode
299 'jabber-browse-mode
300 'slack-mode))))
301
280;; I can never remember all the damn chat things I run, so this just does all of em. 302;; I can never remember all the damn chat things I run, so this just does all of em.
281(defun chat (&optional arg) 303(defun chat (&optional arg)
282 "Initiate all chat functions. 304 "Initiate all chat functions.
283With optional ARG, kill all chat-related buffers first." 305With optional ARG, kill all chat-related buffers first."
284 (interactive "P") 306 (interactive "P")
285 (when arg 307 (when arg (chat-disconnect))
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 ))
292 (mapc #'call-interactively chat-functions)) 308 (mapc #'call-interactively chat-functions))
293 309
294(defun +forward-paragraph (arg) 310(defun +forward-paragraph (arg)