From 5b48c21762cec6878462c868551b19e2afb0e53c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 16 Feb 2019 17:00:31 -0500 Subject: [PATCH] app/irc: fix & improve feedback from =irc #1121 Hopefully prevents =irc from nooping. --- modules/app/irc/autoload/irc.el | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/modules/app/irc/autoload/irc.el b/modules/app/irc/autoload/irc.el index 98846bb40..442f05b77 100644 --- a/modules/app/irc/autoload/irc.el +++ b/modules/app/irc/autoload/irc.el @@ -20,13 +20,17 @@ If INHIBIT-WORKSPACE (the universal argument) is non-nil, don't spawn a new workspace for it." (interactive "P") - (if (+workspace-exists-p +irc--workspace-name) - (+workspace-switch +irc--workspace-name) - (and (+irc-setup-wconf inhibit-workspace) - (if circe-network-options - (cl-loop for network in circe-network-options - collect (circe (car network))) - (quiet! (call-interactively #'circe)))))) + (cond ((and (featurep! :feature workspaces) + (+workspace-exists-p +irc--workspace-name)) + (+workspace-switch +irc--workspace-name)) + ((not (+irc-setup-wconf inhibit-workspace)) + (user-error "Couldn't start up a workspace for IRC"))) + (if (doom-buffers-in-mode 'circe-mode (buffer-list) t) + (message "Circe buffers are already open") + (if circe-network-options + (cl-loop for network in circe-network-options + collect (circe (car network))) + (call-interactively #'circe)))) ;;;###autoload (defun +irc/connect (&optional inhibit-workspace)