aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorF. Jason Park2023-09-10 22:55:16 -0700
committerF. Jason Park2023-09-17 16:06:49 -0700
commitef4a3c2a6d8ef854bed066ce25b31ff73e1d7664 (patch)
treefe980929b57df1f281618a7535614ba3033d7934 /doc/misc
parent7d2870dc856790de343a876611837b38ad6adcff (diff)
downloademacs-ef4a3c2a6d8ef854bed066ce25b31ff73e1d7664.tar.gz
emacs-ef4a3c2a6d8ef854bed066ce25b31ff73e1d7664.zip
; Fix example in display-buffer section of ERC manual
* doc/misc/erc.texi: Fix `display-buffer-alist' example and mention that it's only meant for users of Emacs 29 and above. * test/lisp/erc/erc-tests.el (erc-setup-buffer--custom-action): Add simplistic test case for example in manual.
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/erc.texi11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi
index 6d7785a9b54..3297d8b17f0 100644
--- a/doc/misc/erc.texi
+++ b/doc/misc/erc.texi
@@ -1803,10 +1803,11 @@ Observe that ERC supplies the names of buffer-display options as
1803the symbols @samp{erc-tls} or @samp{url}, the full lineup of which are 1803the symbols @samp{erc-tls} or @samp{url}, the full lineup of which are
1804listed below. 1804listed below.
1805 1805
1806In this second example, the user writes three predicates that somewhat 1806In this second example, for Emacs 29 and above, the user writes three
1807resemble the ``@code{display-buffer}-like'' function above. These too 1807predicates that somewhat resemble the ``@code{display-buffer}-like''
1808look for @var{action} alist keys sharing the names of buffer-display 1808function above. These too look for @var{action} alist keys sharing
1809options (and, in one case, a module's minor mode). 1809the names of ERC's buffer-display options (and, in one case, a
1810module's minor mode).
1810 1811
1811@lisp 1812@lisp
1812(defun my-erc-disp-entry-p (_ action) 1813(defun my-erc-disp-entry-p (_ action)
@@ -1821,7 +1822,7 @@ options (and, in one case, a module's minor mode).
1821 1822
1822(defun my-erc-disp-chan-p (_ action) 1823(defun my-erc-disp-chan-p (_ action)
1823 (or (assq 'erc-autojoin-mode action) 1824 (or (assq 'erc-autojoin-mode action)
1824 (and (memq (cdr (assq 'erc-buffer-display alist)) 'JOIN) 1825 (and (eq (cdr (assq 'erc-buffer-display action)) 'JOIN)
1825 (member (erc-default-target) '("#emacs" "#fsf"))))) 1826 (member (erc-default-target) '("#emacs" "#fsf")))))
1826@end lisp 1827@end lisp
1827 1828