Fix for rcirc load ordering and configuration
I'm not sure if this is necessary, it's possible I'm using this layer incorrectly, but I needed to change the order in which rcirc was loaded, and in which it was configured. This commit fixes all the issues I was running into, but perhaps I'm not using this as intended. Be sure to look carefully over what I changed to make sure it makes sense for what you want this layer to do.
This commit is contained in:
parent
11d29d1699
commit
360cebf259
|
@ -13,23 +13,12 @@ which require an initialization must be listed explicitly in the list.")
|
||||||
(defun rcirc/init-rcirc ()
|
(defun rcirc/init-rcirc ()
|
||||||
(use-package rcirc
|
(use-package rcirc
|
||||||
:defer t
|
:defer t
|
||||||
|
:commands rcirc
|
||||||
:init
|
:init
|
||||||
(progn
|
(progn
|
||||||
(add-to-hook 'rcirc-mode-hook '(flyspell-mode rcirc-omit-mode))
|
(add-to-hook 'rcirc-mode-hook '(flyspell-mode rcirc-omit-mode))
|
||||||
|
|
||||||
(defun spacemacs/rcirc (arg)
|
(evil-leader/set-key "ai" 'rcirc)
|
||||||
"Configure rcirc"
|
|
||||||
(interactive "P")
|
|
||||||
(when (and rcirc-enable-authinfo-support
|
|
||||||
(file-exists-p "~/.authinfo.gpg"))
|
|
||||||
;; Allow rcirc to read authinfo from ~/.authinfo.gpg
|
|
||||||
;; via the auth-source API. This doesn't support the
|
|
||||||
;; chanserv auth method.
|
|
||||||
(unless arg (spacemacs//rcirc-authinfo-config))
|
|
||||||
;; znc need
|
|
||||||
(when rcirc-enable-znc-support (spacemacs//rcirc-znc-config)))
|
|
||||||
(rcirc arg))
|
|
||||||
(evil-leader/set-key "ai" 'spacemacs/rcirc)
|
|
||||||
|
|
||||||
(defun spacemacs//rcirc-authinfo-config ()
|
(defun spacemacs//rcirc-authinfo-config ()
|
||||||
"Initialize authinfo."
|
"Initialize authinfo."
|
||||||
|
@ -105,10 +94,20 @@ which require an initialization must be listed explicitly in the list.")
|
||||||
;; This will replace :auth with the correct thing, see the
|
;; This will replace :auth with the correct thing, see the
|
||||||
;; doc for that function
|
;; doc for that function
|
||||||
(dim:rcirc-server-alist-get-authinfo
|
(dim:rcirc-server-alist-get-authinfo
|
||||||
rcirc-server-alist))
|
rcirc-server-alist))))
|
||||||
))
|
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
|
(when (and rcirc-enable-authinfo-support
|
||||||
|
(file-exists-p "~/.authinfo.gpg"))
|
||||||
|
;; Allow rcirc to read authinfo from ~/.authinfo.gpg
|
||||||
|
;; via the auth-source API. This doesn't support the
|
||||||
|
;; chanserv auth method.
|
||||||
|
(spacemacs//rcirc-authinfo-config))
|
||||||
|
|
||||||
|
;; Prepare for use with znc
|
||||||
|
(when rcirc-enable-znc-support
|
||||||
|
(spacemacs//rcirc-znc-config))
|
||||||
|
|
||||||
(dim:rcirc)
|
(dim:rcirc)
|
||||||
;; (set-input-method "latin-1-prefix")
|
;; (set-input-method "latin-1-prefix")
|
||||||
(set (make-local-variable 'scroll-conservatively) 8192)
|
(set (make-local-variable 'scroll-conservatively) 8192)
|
||||||
|
|
Loading…
Reference in a new issue