diff options
-rw-r--r-- | init.el | 6 | ||||
-rw-r--r-- | lisp/acdw-irc.el | 35 |
2 files changed, 40 insertions, 1 deletions
diff --git a/init.el b/init.el index 4a4c57c..1f03fad 100644 --- a/init.el +++ b/init.el | |||
@@ -243,7 +243,9 @@ AKA, DO NOT USE THIS FUNCTION!!!" | |||
243 | ;; TODO: irc.chat.twitch.tv | 243 | ;; TODO: irc.chat.twitch.tv |
244 | ) | 244 | ) |
245 | circe-reduce-lurker-spam t | 245 | circe-reduce-lurker-spam t |
246 | circe-server-auto-join-default-type :after-auth) | 246 | circe-server-auto-join-default-type :after-auth |
247 | circe-server-buffer-action (lambda (buf) | ||
248 | (message "Connected to %s" buf))) | ||
247 | 249 | ||
248 | ;; (:face circe-nick-highlight-face | 250 | ;; (:face circe-nick-highlight-face |
249 | ;; ((t (:inherit (modus-themes-hl-line))))) | 251 | ;; ((t (:inherit (modus-themes-hl-line))))) |
@@ -637,6 +639,8 @@ AKA, DO NOT USE THIS FUNCTION!!!" | |||
637 | (defun edit-server@set-a-variable (&rest _) | 639 | (defun edit-server@set-a-variable (&rest _) |
638 | (setq-local edit-server-frame-p t)))) | 640 | (setq-local edit-server-frame-p t)))) |
639 | 641 | ||
642 | (setup (:straight el-patch)) | ||
643 | |||
640 | (setup eldoc | 644 | (setup eldoc |
641 | (:option eldoc-idle-delay 0.1 | 645 | (:option eldoc-idle-delay 0.1 |
642 | eldoc-echo-area-use-multiline-p nil)) | 646 | eldoc-echo-area-use-multiline-p nil)) |
diff --git a/lisp/acdw-irc.el b/lisp/acdw-irc.el index b4b75ec..305dc93 100644 --- a/lisp/acdw-irc.el +++ b/lisp/acdw-irc.el | |||
@@ -73,6 +73,41 @@ and right on t." | |||
73 | (dolist (network (mapcar #'car circe-network-options)) | 73 | (dolist (network (mapcar #'car circe-network-options)) |
74 | (circe-maybe-connect network))) | 74 | (circe-maybe-connect network))) |
75 | 75 | ||
76 | (el-patch-feature circe) | ||
77 | (with-eval-after-load 'circe | ||
78 | (defvar circe-server-buffer-action 'pop-to-buffer-same-window | ||
79 | "What to do with `circe-server' buffers when created.") | ||
80 | |||
81 | (el-patch-defun circe (network-or-server &rest server-options) | ||
82 | "Connect to IRC. | ||
83 | |||
84 | Connect to the given network specified by NETWORK-OR-SERVER. | ||
85 | |||
86 | When this function is called, it collects options from the | ||
87 | SERVER-OPTIONS argument, the user variable | ||
88 | `circe-network-options', and the defaults found in | ||
89 | `circe-network-defaults', in this order. | ||
90 | |||
91 | If NETWORK-OR-SERVER is not found in any of these variables, the | ||
92 | argument is assumed to be the host name for the server, and all | ||
93 | relevant settings must be passed via SERVER-OPTIONS. | ||
94 | |||
95 | All SERVER-OPTIONS are treated as variables by getting the string | ||
96 | \"circe-\" prepended to their name. This variable is then set | ||
97 | locally in the server buffer. | ||
98 | |||
99 | See `circe-network-options' for a list of common options." | ||
100 | (interactive (circe--read-network-and-options)) | ||
101 | (let* ((options (circe--server-get-network-options network-or-server | ||
102 | server-options)) | ||
103 | (buffer (circe--server-generate-buffer options))) | ||
104 | (with-current-buffer buffer | ||
105 | (circe-server-mode) | ||
106 | (circe--server-set-variables options) | ||
107 | (circe-reconnect)) | ||
108 | (el-patch-swap (pop-to-buffer-same-window buffer) | ||
109 | (funcall circe-server-buffer-action buffer))))) | ||
110 | |||
76 | (defun circe-network-connected-p (network) | 111 | (defun circe-network-connected-p (network) |
77 | "Return non-nil if there's any Circe server-buffer whose | 112 | "Return non-nil if there's any Circe server-buffer whose |
78 | `circe-server-netwok' is NETWORK." | 113 | `circe-server-netwok' is NETWORK." |