aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJuri Linkov2025-09-27 20:56:54 +0300
committerJuri Linkov2025-09-27 20:56:54 +0300
commit3cdc615218458729b51a715bedc899e3df5bfa64 (patch)
treec3d12ce2ac791d1b599fcdb11966becd8cc1d645 /doc
parent830272b306152666b355f4c186a8df054c31037a (diff)
downloademacs-3cdc615218458729b51a715bedc899e3df5bfa64.tar.gz
emacs-3cdc615218458729b51a715bedc899e3df5bfa64.zip
Improve documentation and customization of 'derived-mode' in buffer predicate
* doc/lispref/buffers.texi (Buffer List): * lisp/subr.el (buffer-match-p): Document that 'derived-mode' can be a list (bug#79481). * lisp/wid-edit.el (buffer-predicate): Support a list for 'derived-mode'.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/buffers.texi11
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index 01aa620b828..e759df5746c 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -991,10 +991,13 @@ Satisfied if @emph{any} condition in @var{conds} satisfies
991Satisfied if @emph{all} the conditions in @var{conds} satisfy 991Satisfied if @emph{all} the conditions in @var{conds} satisfy
992@code{buffer-match-p}, with the same buffer and @code{args}. 992@code{buffer-match-p}, with the same buffer and @code{args}.
993@item derived-mode 993@item derived-mode
994Satisfied if the buffer's major mode derives from @var{expr}. Note 994Satisfied if the buffer's major mode derives from @var{expr}.
995that this condition might fail to report a match if 995The value of @var{expr} can be either a single mode symbol
996@code{buffer-match-p} is invoked before the major mode of the buffer 996or a list of mode symbols as accepted by the function
997has been established. 997@code{provided-mode-derived-p} (@pxref{Derived Modes}).
998Note that this condition might fail to report a match if
999@code{buffer-match-p} is invoked before the major mode of
1000the buffer has been established.
998@item major-mode 1001@item major-mode
999Satisfied if the buffer's major mode is equal to @var{expr}. Prefer 1002Satisfied if the buffer's major mode is equal to @var{expr}. Prefer
1000using @code{derived-mode} instead, when both can work. Note that this 1003using @code{derived-mode} instead, when both can work. Note that this