aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorF. Jason Park2024-10-02 16:41:39 -0700
committerF. Jason Park2024-10-11 16:13:09 -0700
commit3f1ce47fe7eb4809bfa9ef035caae748c3c5d729 (patch)
treecf79347610f32b9a96b1828095fe3122bf025c48
parenta30f115daada7633ac3f6d1b93e564c8b15612a3 (diff)
downloademacs-3f1ce47fe7eb4809bfa9ef035caae748c3c5d729.tar.gz
emacs-3f1ce47fe7eb4809bfa9ef035caae748c3c5d729.zip
; 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.
-rw-r--r--doc/misc/erc.texi30
1 files 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}).
1324;;; My ERC configuration -*- lexical-binding: t -*- 1324;;; My ERC configuration -*- lexical-binding: t -*-
1325 1325
1326(use-package erc 1326(use-package erc
1327 :config
1328 ;; Prefer SASL to NickServ, colorize nicknames, and show side panels
1329 ;; with joined channels and members
1330 (setopt erc-modules
1331 (seq-union '(sasl nicks bufbar nickbar scrolltobottom)
1332 erc-modules))
1333
1334 :custom 1327 :custom
1328 ;; Prefer SASL to NickServ, colorize nicknames, and show side panels
1329 ;; with joined channels and members.
1330 (erc-modules (append '(sasl nicks bufbar nickbar scrolltobottom)
1331 erc-modules))
1335 ;; Protect me from accidentally sending excess lines. 1332 ;; Protect me from accidentally sending excess lines.
1336 (erc-inhibit-multiline-input t) 1333 (erc-inhibit-multiline-input t)
1337 (erc-send-whitespace-lines t) 1334 (erc-send-whitespace-lines t)
@@ -1372,6 +1369,13 @@ settings (@pxref{Sample configuration via Customize}).
1372 1369
1373 :bind (:map erc-fill-wrap-mode-map ("C-c =" . #'erc-fill-wrap-nudge))) 1370 :bind (:map erc-fill-wrap-mode-map ("C-c =" . #'erc-fill-wrap-nudge)))
1374 1371
1372(use-package erc-match
1373 ;; Use the same face for my own nick wherever it appears.
1374 :custom-face
1375 (erc-current-nick-face ((t ( :weight unspecified
1376 :foreground unspecified
1377 :inherit erc-my-nick-face)))))
1378
1375(use-package erc-track 1379(use-package erc-track
1376 ;; Prevent JOINs and PARTs from lighting up the mode-line. 1380 ;; Prevent JOINs and PARTs from lighting up the mode-line.
1377 :config (setopt erc-track-faces-priority-list 1381 :config (setopt erc-track-faces-priority-list
@@ -1552,6 +1556,18 @@ function @code{erc-fill-wrap-nudge} in the minor-mode keymap
1552@code{erc-fill-wrap-mode-hook}, and it's not a member of any 1556@code{erc-fill-wrap-mode-hook}, and it's not a member of any
1553customization group). 1557customization group).
1554 1558
1559Try customizing another face, this time with inheritance. ERC's match
1560module highlights your nick whenever someone mentions you in
1561conversation. However, some users don't like that this face differs
1562from the one in your own messages. Let's change that. Type @kbd{M-x
1563customize-group @key{RET} erc-faces @key{RET}}. Either search for the
1564word ``Current'' or type @kbd{M-x customize-face @key{RET}
1565erc-current-nick-face @key{RET}}. Untick @samp{Weight} and
1566@samp{Foreground}, then click the ``Show All Attributes'' button below
1567them. Navigate down to the @samp{Inherit} box, tick it, hit
1568@samp{[INS]}, and type @code{erc-my-nick-face} in the @samp{Face} field.
1569Hit @kbd{C-x C-s} to save.
1570
1555ERC users tend to be picky about the mode line. If you find that 1571ERC users tend to be picky about the mode line. If you find that
1556you'd rather not see changes when people join and leave channels, 1572you'd rather not see changes when people join and leave channels,
1557customize the option @code{erc-track-faces-priority-list}. When 1573customize the option @code{erc-track-faces-priority-list}. When