summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2021-09-15 17:33:12 -0500
committerCase Duckworth2021-09-15 17:33:12 -0500
commit083c922ebcece6fc7a7545225d1096d0d49d95c3 (patch)
tree0620c30d93760e468bb0e57d1a5d6184550d6f67 /lisp
parentMerge branch 'main' of https://tildegit.org/acdw/emacs (diff)
downloademacs-083c922ebcece6fc7a7545225d1096d0d49d95c3.tar.gz
emacs-083c922ebcece6fc7a7545225d1096d0d49d95c3.zip
Patch circe
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw-irc.el35
1 files changed, 35 insertions, 0 deletions
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."