erc: use linum post init and remove weird erc-hook

the usage of undocumented erc-hook is weird, let's see if we need it.
This commit is contained in:
syl20bnr 2016-06-03 22:18:45 -04:00
parent 2262bbc568
commit a4db13e3a6
1 changed files with 13 additions and 15 deletions

View File

@ -27,6 +27,7 @@
erc-view-log
(erc-yank :location local :excluded t)
erc-yt
linum
persp-mode
))
@ -48,21 +49,14 @@
(use-package erc
:defer t
:init
(spacemacs/set-leader-keys
"aie" 'erc
"aiE" 'erc-tls
"aii" 'erc-track-switch-buffer
"aiD" 'erc/default-servers)
;; utf-8 always and forever
(setq erc-server-coding-system '(utf-8 . utf-8))
;; disable linum mode in erc
;; check if this will not be efficient
(defun no-linum (&rest ignore)
(when (or 'linum-mode global-linum-mode)
(linum-mode 0)))
(spacemacs/add-to-hooks 'no-linum '(erc-hook
erc-mode-hook
erc-insert-pre-hook))
(progn
(spacemacs/set-leader-keys
"aie" 'erc
"aiE" 'erc-tls
"aii" 'erc-track-switch-buffer
"aiD" 'erc/default-servers)
;; utf-8 always and forever
(setq erc-server-coding-system '(utf-8 . utf-8)))
:config
(progn
(use-package erc-autoaway
@ -230,6 +224,10 @@
(use-package erc-terminal-notifier
:if (executable-find "terminal-notifier")))
(defun erc/post-init-linum ()
(spacemacs/add-to-hooks 'no-linum '(erc-mode-hook
erc-insert-pre-hook)))
(defun erc/post-init-persp-mode ()
;; do not save erc buffers
(with-eval-after-load 'persp-mode