Patch circe
This commit is contained in:
parent
f3c9b7c3d9
commit
083c922ebc
6
init.el
6
init.el
|
@ -243,7 +243,9 @@ AKA, DO NOT USE THIS FUNCTION!!!"
|
|||
;; TODO: irc.chat.twitch.tv
|
||||
)
|
||||
circe-reduce-lurker-spam t
|
||||
circe-server-auto-join-default-type :after-auth)
|
||||
circe-server-auto-join-default-type :after-auth
|
||||
circe-server-buffer-action (lambda (buf)
|
||||
(message "Connected to %s" buf)))
|
||||
|
||||
;; (:face circe-nick-highlight-face
|
||||
;; ((t (:inherit (modus-themes-hl-line)))))
|
||||
|
@ -637,6 +639,8 @@ AKA, DO NOT USE THIS FUNCTION!!!"
|
|||
(defun edit-server@set-a-variable (&rest _)
|
||||
(setq-local edit-server-frame-p t))))
|
||||
|
||||
(setup (:straight el-patch))
|
||||
|
||||
(setup eldoc
|
||||
(:option eldoc-idle-delay 0.1
|
||||
eldoc-echo-area-use-multiline-p nil))
|
||||
|
|
|
@ -73,6 +73,41 @@ and right on t."
|
|||
(dolist (network (mapcar #'car circe-network-options))
|
||||
(circe-maybe-connect network)))
|
||||
|
||||
(el-patch-feature circe)
|
||||
(with-eval-after-load 'circe
|
||||
(defvar circe-server-buffer-action 'pop-to-buffer-same-window
|
||||
"What to do with `circe-server' buffers when created.")
|
||||
|
||||
(el-patch-defun circe (network-or-server &rest server-options)
|
||||
"Connect to IRC.
|
||||
|
||||
Connect to the given network specified by NETWORK-OR-SERVER.
|
||||
|
||||
When this function is called, it collects options from the
|
||||
SERVER-OPTIONS argument, the user variable
|
||||
`circe-network-options', and the defaults found in
|
||||
`circe-network-defaults', in this order.
|
||||
|
||||
If NETWORK-OR-SERVER is not found in any of these variables, the
|
||||
argument is assumed to be the host name for the server, and all
|
||||
relevant settings must be passed via SERVER-OPTIONS.
|
||||
|
||||
All SERVER-OPTIONS are treated as variables by getting the string
|
||||
\"circe-\" prepended to their name. This variable is then set
|
||||
locally in the server buffer.
|
||||
|
||||
See `circe-network-options' for a list of common options."
|
||||
(interactive (circe--read-network-and-options))
|
||||
(let* ((options (circe--server-get-network-options network-or-server
|
||||
server-options))
|
||||
(buffer (circe--server-generate-buffer options)))
|
||||
(with-current-buffer buffer
|
||||
(circe-server-mode)
|
||||
(circe--server-set-variables options)
|
||||
(circe-reconnect))
|
||||
(el-patch-swap (pop-to-buffer-same-window buffer)
|
||||
(funcall circe-server-buffer-action buffer)))))
|
||||
|
||||
(defun circe-network-connected-p (network)
|
||||
"Return non-nil if there's any Circe server-buffer whose
|
||||
`circe-server-netwok' is NETWORK."
|
||||
|
|
Loading…
Reference in New Issue