diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-07-17 11:59:58 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-07-17 11:59:58 +0200 |
| commit | cb7f42016e6d9baaebfdf083c86988d03d6dafc9 (patch) | |
| tree | 797cd5820e0ca5c9bc0d77e9dd8f4f1816c32b25 /.emacs | |
| parent | c9d67121d856a9cda077cbc591a1cc4034ef3034 (diff) | |
| download | dotfiles-cb7f42016e6d9baaebfdf083c86988d03d6dafc9.tar.xz | |
Give up on fine-grained erc-modules customization
I wanted to add 'notifications to the list, started wondering whether
I should change the hook by looping over cons or using append, and got
bored.
For the record, I want to include:
- log
- notifications
and exclude:
- fill
Diffstat (limited to '.emacs')
| -rw-r--r-- | .emacs | 24 |
1 files changed, 0 insertions, 24 deletions
@@ -283,30 +283,6 @@ (add-hook 'shell-mode-hook 'my/shell-hook) -;; What I mean: -;; (defun my/erc-hook () -;; (add-to-list 'erc-modules 'log) -;; (delq 'fill erc-modules) -;; (erc-update-modules)) -;; -;; That cannot work because erc-update-modules only iterates over -;; erc-modules, so it will not act on the `fill' module. -;; -;; I do *not* want to maintain an exhaustive and manually curated list -;; of ERC modules; I just want to add/remove a few ones. Customizing -;; erc-{log,fill}-mode does not work: the contents of erc-modules -;; take precedence. -;; -;; My best attempt at solving this is thus abusing erc-modules's -;; setter function, which will iterate over items in the old value, -;; and disable those that are absent from the new one. -(defun my/erc-hook () - (let ((new-modules - (delete-dups (remq 'fill (cons 'log erc-modules))))) - (customize-set-variable 'erc-modules new-modules))) - -(add-hook 'erc-mode-hook 'my/erc-hook) - (add-hook 'dired-mode-hook 'diff-hl-dired-mode-unless-remote) (add-to-list 'ibuffer-saved-filter-groups |
