diff options
| author | Juri Linkov | 2025-09-27 20:56:54 +0300 |
|---|---|---|
| committer | Juri Linkov | 2025-09-27 20:56:54 +0300 |
| commit | 3cdc615218458729b51a715bedc899e3df5bfa64 (patch) | |
| tree | c3d12ce2ac791d1b599fcdb11966becd8cc1d645 /doc | |
| parent | 830272b306152666b355f4c186a8df054c31037a (diff) | |
| download | emacs-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.texi | 11 |
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 | |||
| 991 | Satisfied if @emph{all} the conditions in @var{conds} satisfy | 991 | Satisfied 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 |
| 994 | Satisfied if the buffer's major mode derives from @var{expr}. Note | 994 | Satisfied if the buffer's major mode derives from @var{expr}. |
| 995 | that this condition might fail to report a match if | 995 | The 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 | 996 | or a list of mode symbols as accepted by the function |
| 997 | has been established. | 997 | @code{provided-mode-derived-p} (@pxref{Derived Modes}). |
| 998 | Note that this condition might fail to report a match if | ||
| 999 | @code{buffer-match-p} is invoked before the major mode of | ||
| 1000 | the buffer has been established. | ||
| 998 | @item major-mode | 1001 | @item major-mode |
| 999 | Satisfied if the buffer's major mode is equal to @var{expr}. Prefer | 1002 | Satisfied if the buffer's major mode is equal to @var{expr}. Prefer |
| 1000 | using @code{derived-mode} instead, when both can work. Note that this | 1003 | using @code{derived-mode} instead, when both can work. Note that this |