summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-09-15 17:33:12 -0500
committerCase Duckworth2021-09-15 17:33:12 -0500
commit083c922ebcece6fc7a7545225d1096d0d49d95c3 (patch)
tree0620c30d93760e468bb0e57d1a5d6184550d6f67
parentMerge branch 'main' of https://tildegit.org/acdw/emacs (diff)
downloademacs-083c922ebcece6fc7a7545225d1096d0d49d95c3.tar.gz
emacs-083c922ebcece6fc7a7545225d1096d0d49d95c3.zip
Patch circe
-rw-r--r--init.el6
-rw-r--r--lisp/acdw-irc.el35
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
84Connect to the given network specified by NETWORK-OR-SERVER.
85
86When this function is called, it collects options from the
87SERVER-OPTIONS argument, the user variable
88`circe-network-options', and the defaults found in
89`circe-network-defaults', in this order.
90
91If NETWORK-OR-SERVER is not found in any of these variables, the
92argument is assumed to be the host name for the server, and all
93relevant settings must be passed via SERVER-OPTIONS.
94
95All SERVER-OPTIONS are treated as variables by getting the string
96\"circe-\" prepended to their name. This variable is then set
97locally in the server buffer.
98
99See `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."