diff --git a/modules/app/irc/autoload/irc.el b/modules/app/irc/autoload/irc.el index 038d36978..699422c4a 100644 --- a/modules/app/irc/autoload/irc.el +++ b/modules/app/irc/autoload/irc.el @@ -49,16 +49,17 @@ workspace for it." (defun +irc/quit () "Kill current circe session and workgroup." (interactive) - (if (y-or-n-p "Really kill IRC session?") - (let (circe-channel-killed-confirmation - circe-server-killed-confirmation) - (when +irc--defer-timer - (cancel-timer +irc--defer-timer)) - (disable-circe-notifications) - (mapc #'kill-buffer (doom-buffers-in-mode 'circe-mode (buffer-list) t)) - (when (equal (+workspace-current-name) +irc--workspace-name) - (+workspace/delete +irc--workspace-name))) - (message "Aborted"))) + (unless (y-or-n-p "Really kill IRC session?") + (user-error "Aborted")) + (let (circe-channel-killed-confirmation + circe-server-killed-confirmation) + (when +irc--defer-timer + (cancel-timer +irc--defer-timer)) + (disable-circe-notifications) + (mapc #'kill-buffer (doom-buffers-in-mode 'circe-mode (buffer-list) t)) + (when (featurep! :ui workspaces) + (when (equal (+workspace-current-name) +irc--workspace-name) + (+workspace/delete +irc--workspace-name))))) ;;;###autoload (defun +irc/ivy-jump-to-channel (&optional this-server) @@ -90,7 +91,7 @@ argument) is non-nil only show channels in current server." ;;;###autoload (defun +irc/tracking-next-buffer () - "Dissables switching to an unread buffer unless in the irc workspace." + "Disables switching to an unread buffer unless in the irc workspace." (interactive) (when (derived-mode-p 'circe-mode) (tracking-next-buffer))) @@ -103,13 +104,12 @@ argument) is non-nil only show channels in current server." (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)))) + (derived-mode-p 'circe-mode))) ;;;###autoload (defun +irc--add-circe-buffer-to-persp-h () - (when (bound-and-true-p persp-mode) + (when (and (bound-and-true-p persp-mode) + (+workspace-exists-p +irc--workspace-name)) (let ((persp (get-current-persp)) (buf (current-buffer))) ;; Add a new circe buffer to irc workspace when we're in another workspace