2015-03-25 03:34:19 +00:00
|
|
|
;;; packages.el --- erc Layer packages File for Spacemacs
|
|
|
|
;;
|
|
|
|
;; Copyright (c) 2012-2014 Sylvain Benner
|
|
|
|
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
|
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
2015-03-28 02:24:39 +00:00
|
|
|
(defvar erc-packages '(erc)
|
2015-03-25 03:34:19 +00:00
|
|
|
"List of all packages to install and/or initialize. Built-in packages
|
|
|
|
which require an initialization must be listed explicitly in the list.")
|
|
|
|
|
2015-03-28 02:24:39 +00:00
|
|
|
(when (system-is-mac)
|
|
|
|
(push 'erc-terminal-notifier erc-packages))
|
|
|
|
|
2015-03-25 03:34:19 +00:00
|
|
|
(defvar erc-excluded-packages '()
|
|
|
|
"List of packages to exclude.")
|
|
|
|
|
|
|
|
(defun erc/init-erc ()
|
|
|
|
"Initialize ERC"
|
|
|
|
(use-package erc
|
|
|
|
:defer t
|
|
|
|
:init
|
2015-04-09 05:27:23 +00:00
|
|
|
(evil-leader/set-key "aie" 'erc)
|
2015-03-28 02:24:39 +00:00
|
|
|
:config
|
2015-03-25 03:34:19 +00:00
|
|
|
(progn
|
2015-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
(defun erc-list-command ()
|
2015-03-28 02:24:39 +00:00
|
|
|
"execute the list command"
|
|
|
|
(interactive)
|
2015-03-25 18:29:11 +00:00
|
|
|
(insert "/list")
|
|
|
|
(erc-send-current-line))
|
|
|
|
|
2015-03-28 02:24:39 +00:00
|
|
|
(setq erc-kill-buffer-on-part t
|
|
|
|
erc-kill-queries-on-quit t
|
|
|
|
erc-kill-server-buffer-on-quit t)
|
2015-03-25 18:29:11 +00:00
|
|
|
|
2015-03-28 02:24:39 +00:00
|
|
|
(erc-track-mode t)
|
|
|
|
(setq erc-track-exclude-types '("JOIN" "NICK" "PART" "QUIT" "MODE")
|
|
|
|
erc-server-coding-system '(utf-8 . utf-8))
|
2015-03-25 18:29:11 +00:00
|
|
|
;; keybindings
|
|
|
|
(evil-leader/set-key-for-mode 'erc-mode
|
|
|
|
"mb" 'erc-iswitchb
|
|
|
|
"md" 'erc-input-action
|
|
|
|
"mj" 'erc-join-channel
|
|
|
|
"mn" 'erc-channel-names
|
|
|
|
"ml" 'erc-list-command
|
|
|
|
"mp" 'erc-part-from-channel
|
2015-03-28 02:24:39 +00:00
|
|
|
"mq" 'erc-quit-server))))
|
2015-04-03 21:35:33 +00:00
|
|
|
|
|
|
|
(defun erc/init-erc-terminal-notifier ())
|