[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 3f1ce47fe7e 1/5: ; Add face customization to ERC's sample config
From: |
F. Jason Park |
Subject: |
master 3f1ce47fe7e 1/5: ; Add face customization to ERC's sample config |
Date: |
Fri, 11 Oct 2024 19:16:31 -0400 (EDT) |
branch: master
commit 3f1ce47fe7eb4809bfa9ef035caae748c3c5d729
Author: F. Jason Park <jp@neverwas.me>
Commit: F. Jason Park <jp@neverwas.me>
; Add face customization to ERC's sample config
* doc/misc/erc.texi (Sample Configuration): Move `erc-modules' twiddling
from a `use-package' :config section to a :custom section. In the past,
this would sometimes provoke module-loading issues, but it seems to work
fine on Emacs 30, even with repeated eval'ing of the `use-package' form.
This sample config is meant for users running the latest release anyhow.
Also add a new `use-package' block for `erc-match' showing how to
customize a face using inheritance. Add a corresponding section further
down showing the same via Customize.
---
doc/misc/erc.texi | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)
diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi
index 9cfb12c9231..9368c9ce070 100644
--- a/doc/misc/erc.texi
+++ b/doc/misc/erc.texi
@@ -1324,14 +1324,11 @@ settings (@pxref{Sample configuration via Customize}).
;;; My ERC configuration -*- lexical-binding: t -*-
(use-package erc
- :config
- ;; Prefer SASL to NickServ, colorize nicknames, and show side panels
- ;; with joined channels and members
- (setopt erc-modules
- (seq-union '(sasl nicks bufbar nickbar scrolltobottom)
- erc-modules))
-
:custom
+ ;; Prefer SASL to NickServ, colorize nicknames, and show side panels
+ ;; with joined channels and members.
+ (erc-modules (append '(sasl nicks bufbar nickbar scrolltobottom)
+ erc-modules))
;; Protect me from accidentally sending excess lines.
(erc-inhibit-multiline-input t)
(erc-send-whitespace-lines t)
@@ -1372,6 +1369,13 @@ settings (@pxref{Sample configuration via Customize}).
:bind (:map erc-fill-wrap-mode-map ("C-c =" . #'erc-fill-wrap-nudge)))
+(use-package erc-match
+ ;; Use the same face for my own nick wherever it appears.
+ :custom-face
+ (erc-current-nick-face ((t ( :weight unspecified
+ :foreground unspecified
+ :inherit erc-my-nick-face)))))
+
(use-package erc-track
;; Prevent JOINs and PARTs from lighting up the mode-line.
:config (setopt erc-track-faces-priority-list
@@ -1552,6 +1556,18 @@ function @code{erc-fill-wrap-nudge} in the minor-mode
keymap
@code{erc-fill-wrap-mode-hook}, and it's not a member of any
customization group).
+Try customizing another face, this time with inheritance. ERC's match
+module highlights your nick whenever someone mentions you in
+conversation. However, some users don't like that this face differs
+from the one in your own messages. Let's change that. Type @kbd{M-x
+customize-group @key{RET} erc-faces @key{RET}}. Either search for the
+word ``Current'' or type @kbd{M-x customize-face @key{RET}
+erc-current-nick-face @key{RET}}. Untick @samp{Weight} and
+@samp{Foreground}, then click the ``Show All Attributes'' button below
+them. Navigate down to the @samp{Inherit} box, tick it, hit
+@samp{[INS]}, and type @code{erc-my-nick-face} in the @samp{Face} field.
+Hit @kbd{C-x C-s} to save.
+
ERC users tend to be picky about the mode line. If you find that
you'd rather not see changes when people join and leave channels,
customize the option @code{erc-track-faces-priority-list}. When