2015-04-19 03:40:24 +00:00
|
|
|
(setq rcirc-packages
|
2015-03-13 07:34:27 +00:00
|
|
|
'(
|
2015-08-18 22:27:49 +00:00
|
|
|
company
|
|
|
|
company-emoji
|
2015-08-27 01:55:28 +00:00
|
|
|
emoji-cheat-sheet-plus
|
2015-10-31 13:30:10 +00:00
|
|
|
flyspell
|
2016-05-30 02:39:21 +00:00
|
|
|
(helm-rcirc :location local
|
core: implement :depends for package declarations
This replaces the older pattern
:toggle (configuration-layer/package-usedp ..)
This implementation ensures that :disabled-for honors dependent packages, i.e.
if package a depends on package b, which is owned by layer c, and layer c is
disabled for layer d, then neither package a nor b will be configured for layer
d. Previously, this was only true for package a, but not b.
This commit also fixes:
- configuration-layer/describe-package now shows which post-init and pre-init
functions are disabled, if any
- Does not recreate all layer objects unconditionally when calling
configuration-layer/discover-layers. Previously, this led to all layers being
recreated after e.g. `SPC h SPC`, without any of the dotfile information.
Since this information is now necessary for
configuration-layer/describe-package, it’s important that we don’t clear the
indexed layers when invoking this function.
2017-06-21 10:27:59 +00:00
|
|
|
:depends helm)
|
2015-11-09 04:51:29 +00:00
|
|
|
persp-mode
|
2015-08-27 01:55:28 +00:00
|
|
|
rcirc
|
|
|
|
rcirc-color
|
|
|
|
rcirc-notify
|
2015-04-19 03:40:24 +00:00
|
|
|
))
|
2015-03-13 07:34:27 +00:00
|
|
|
|
2016-05-30 02:39:21 +00:00
|
|
|
(defun rcirc/post-init-company ()
|
2017-01-02 05:39:04 +00:00
|
|
|
(spacemacs|add-company-backends :backends company-capf :modes rcirc-mode))
|
2015-08-27 01:55:28 +00:00
|
|
|
|
2016-05-30 02:39:21 +00:00
|
|
|
(defun rcirc/post-init-company-emoji ()
|
2017-01-02 05:39:04 +00:00
|
|
|
(spacemacs|add-company-backends :backends company-emoji :modes rcirc-mode))
|
2015-08-27 01:55:28 +00:00
|
|
|
|
|
|
|
(defun rcirc/post-init-emoji-cheat-sheet-plus ()
|
|
|
|
(add-hook 'rcirc-mode-hook 'emoji-cheat-sheet-plus-display-mode))
|
|
|
|
|
2015-10-31 13:30:10 +00:00
|
|
|
(defun rcirc/post-init-flyspell ()
|
2015-12-09 11:29:19 +00:00
|
|
|
(spell-checking/add-flyspell-hook 'rcirc-mode-hook))
|
2015-10-31 13:30:10 +00:00
|
|
|
|
2016-05-30 02:39:21 +00:00
|
|
|
(defun rcirc/init-helm-rcirc ()
|
|
|
|
(use-package helm-rcirc
|
|
|
|
:commands helm-rcirc-auto-join-channels
|
|
|
|
:init
|
|
|
|
(spacemacs/set-leader-keys "irc" 'helm-rcirc-auto-join-channels)))
|
2016-01-18 03:06:04 +00:00
|
|
|
|
2015-11-09 04:51:29 +00:00
|
|
|
(defun rcirc/post-init-persp-mode ()
|
2016-02-27 14:29:56 +00:00
|
|
|
;; do not save rcirc buffers
|
|
|
|
(with-eval-after-load 'persp-mode
|
|
|
|
(push (lambda (b) (with-current-buffer b (eq major-mode 'rcirc-mode)))
|
|
|
|
persp-filter-save-buffers-functions))
|
2016-01-25 04:28:10 +00:00
|
|
|
|
2016-02-27 14:29:56 +00:00
|
|
|
(spacemacs|define-custom-layout rcirc-spacemacs-layout-name
|
|
|
|
:binding rcirc-spacemacs-layout-binding
|
|
|
|
:body
|
|
|
|
(progn
|
|
|
|
(add-hook 'rcirc-mode-hook #'spacemacs-layouts/add-rcirc-buffer-to-persp)
|
|
|
|
(call-interactively 'spacemacs/rcirc))))
|
2015-11-09 04:51:29 +00:00
|
|
|
|
2015-03-13 07:34:27 +00:00
|
|
|
(defun rcirc/init-rcirc ()
|
|
|
|
(use-package rcirc
|
2015-03-18 04:29:09 +00:00
|
|
|
:defer t
|
2015-03-16 01:42:40 +00:00
|
|
|
:init
|
|
|
|
(progn
|
2015-08-28 11:02:20 +00:00
|
|
|
(spacemacs/add-to-hook 'rcirc-mode-hook '(rcirc-omit-mode
|
2017-06-18 10:47:11 +00:00
|
|
|
rcirc-track-minor-mode))
|
2015-03-18 02:50:11 +00:00
|
|
|
|
2015-11-18 00:38:05 +00:00
|
|
|
(spacemacs/set-leader-keys "air" 'spacemacs/rcirc)
|
2015-12-15 21:36:18 +00:00
|
|
|
(evil-set-initial-state 'rcirc-mode 'insert))
|
2015-03-15 22:06:09 +00:00
|
|
|
:config
|
2015-03-13 07:34:27 +00:00
|
|
|
(progn
|
2015-03-16 01:42:40 +00:00
|
|
|
;; (set-input-method "latin-1-prefix")
|
|
|
|
(set (make-local-variable 'scroll-conservatively) 8192)
|
|
|
|
|
2015-03-13 07:34:27 +00:00
|
|
|
(setq rcirc-fill-column 80
|
|
|
|
rcirc-buffer-maximum-lines 2048
|
|
|
|
rcirc-omit-responses '("JOIN" "PART" "QUIT" "NICK" "AWAY" "MODE")
|
|
|
|
rcirc-time-format "%Y-%m-%d %H:%M "
|
|
|
|
rcirc-omit-threshold 20)
|
|
|
|
|
|
|
|
;; Exclude rcirc properties when yanking, in order to be able to send mails
|
|
|
|
;; for example.
|
|
|
|
(add-to-list 'yank-excluded-properties 'rcirc-text)
|
|
|
|
|
2015-03-16 01:42:40 +00:00
|
|
|
;; rcirc-reconnect
|
2015-08-13 13:02:03 +00:00
|
|
|
(let ((dir (configuration-layer/get-layer-local-dir 'rcirc)))
|
2015-03-13 07:34:27 +00:00
|
|
|
(require 'rcirc-reconnect
|
|
|
|
(concat dir "rcirc-reconnect/rcirc-reconnect.el")))
|
2015-03-16 01:42:40 +00:00
|
|
|
|
|
|
|
;; load this file from the dropbox location load-path
|
|
|
|
;; this is where you can store personal information
|
2015-03-13 07:34:27 +00:00
|
|
|
(require 'pinit-rcirc nil 'noerror)
|
|
|
|
|
2015-04-21 03:29:33 +00:00
|
|
|
(evil-define-key 'normal rcirc-mode-map
|
|
|
|
(kbd "C-j") 'rcirc-insert-prev-input
|
|
|
|
(kbd "C-k") 'rcirc-insert-next-input)
|
2015-03-13 07:34:27 +00:00
|
|
|
|
2015-03-16 01:42:40 +00:00
|
|
|
;; add a key for EMMS integration
|
|
|
|
(when (boundp 'emms-track-description)
|
2017-06-18 10:47:11 +00:00
|
|
|
(define-key rcirc-mode-map (kbd "C-c C-e") 'spacemacs/rcirc-insert-current-emms-track))
|
2015-03-13 07:34:27 +00:00
|
|
|
|
2015-03-17 19:42:41 +00:00
|
|
|
;; Minimal logging to `~/.emacs.d/.cache/rcirc-logs/'
|
2015-03-13 07:34:27 +00:00
|
|
|
;; by courtesy of Trent Buck.
|
2015-03-17 19:42:41 +00:00
|
|
|
(setq rcirc-log-directory (concat spacemacs-cache-directory "/rcirc-logs/"))
|
2015-03-13 07:34:27 +00:00
|
|
|
(setq rcirc-log-flag t)
|
2017-06-18 10:47:11 +00:00
|
|
|
(add-hook 'rcirc-print-hooks 'spacemacs//rcirc-write-log)
|
2015-03-16 01:42:40 +00:00
|
|
|
|
|
|
|
;; dependencies
|
|
|
|
;; will autoload rcirc-notify
|
|
|
|
(rcirc-notify-add-hooks)
|
|
|
|
(require 'rcirc-color))))
|
2015-03-13 07:34:27 +00:00
|
|
|
|
2015-08-27 01:55:28 +00:00
|
|
|
(defun rcirc/init-rcirc-color ()
|
|
|
|
(use-package rcirc-color :defer t))
|
|
|
|
|
2015-03-13 07:34:27 +00:00
|
|
|
(defun rcirc/init-rcirc-notify ()
|
|
|
|
(use-package rcirc-notify
|
2015-03-16 01:42:40 +00:00
|
|
|
:defer t
|
|
|
|
:config
|
2015-03-13 07:34:27 +00:00
|
|
|
(progn
|
2015-03-16 01:42:40 +00:00
|
|
|
(add-hook 'rcirc-notify-page-me-hooks 'spacemacs/rcirc-notify-beep))))
|