diff options
| author | Eli Zaretskii | 2024-11-21 12:28:26 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2024-11-21 12:28:26 +0200 |
| commit | 3eb3018682595208076fe7beea1175e123cf1966 (patch) | |
| tree | 28d62c1579dacdd989ea1be90d1332e9044ff3a6 /doc | |
| parent | 4d80c4f4858916becd528b236b29085d29cf3706 (diff) | |
| download | emacs-3eb3018682595208076fe7beea1175e123cf1966.tar.gz emacs-3eb3018682595208076fe7beea1175e123cf1966.zip | |
; Improve documentation of 'category' in display-buffer actions
* doc/lispref/windows.texi (Choosing Window)
(Buffer Display Action Alists): Add cross-references.
* doc/lispref/buffers.texi (Buffer List):
* lisp/subr.el (buffer-match-p): Improve documentation of
'category' condition. (Bug#74361)
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/buffers.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 13 |
2 files changed, 16 insertions, 3 deletions
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index 5375eb64155..5aa712e4247 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi | |||
| @@ -1000,6 +1000,12 @@ 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 | 1000 | using @code{derived-mode} instead, when both can work. Note that this |
| 1001 | condition might fail to report a match if @code{buffer-match-p} is | 1001 | condition might fail to report a match if @code{buffer-match-p} is |
| 1002 | invoked before the major mode of the buffer has been established. | 1002 | invoked before the major mode of the buffer has been established. |
| 1003 | @item category | ||
| 1004 | This is pertinent only when this function is called by | ||
| 1005 | @code{display-buffer} (@pxref{Buffer Display Action Alists}), and is | ||
| 1006 | satisfied if the action alist with which @code{display-buffer} was | ||
| 1007 | called includes @w{@code{(category . @var{expr})}} in the value of its | ||
| 1008 | @var{action} argument. @xref{Buffer Display Action Alists}. | ||
| 1003 | @end table | 1009 | @end table |
| 1004 | @item t | 1010 | @item t |
| 1005 | Satisfied by any buffer. A convenient alternative to @code{""} (empty | 1011 | Satisfied by any buffer. A convenient alternative to @code{""} (empty |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index f5963d984e9..c7e575b0e4f 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -2656,6 +2656,9 @@ for example: | |||
| 2656 | @end group | 2656 | @end group |
| 2657 | @end example | 2657 | @end example |
| 2658 | 2658 | ||
| 2659 | @noindent | ||
| 2660 | @xref{Buffer List, @code{buffer-match-p}}. | ||
| 2661 | |||
| 2659 | Regardless of the displayed buffer's name the caller defines a category | 2662 | Regardless of the displayed buffer's name the caller defines a category |
| 2660 | as a symbol @code{comint}. Then @code{display-buffer-alist} matches | 2663 | as a symbol @code{comint}. Then @code{display-buffer-alist} matches |
| 2661 | this category for all buffers displayed with the same category. | 2664 | this category for all buffers displayed with the same category. |
| @@ -3405,9 +3408,13 @@ windows were selected afterwards within this command. | |||
| 3405 | @vindex category@r{, a buffer display action alist entry} | 3408 | @vindex category@r{, a buffer display action alist entry} |
| 3406 | @item category | 3409 | @item category |
| 3407 | If the caller of @code{display-buffer} passes an alist entry | 3410 | If the caller of @code{display-buffer} passes an alist entry |
| 3408 | @code{(category . symbol)} in its @var{action} argument, then you can | 3411 | @w{@code{(category . @var{symbol})}} in its @var{action} argument, then you |
| 3409 | match the displayed buffer by using the same category in the condition | 3412 | can match the displayed buffer by using the same category symbol in the |
| 3410 | part of @code{display-buffer-alist} entries. | 3413 | condition part of @code{display-buffer-alist} entries. @xref{Buffer |
| 3414 | List, @code{buffer-match-p}}. Thus, if a Lisp program uses a particular | ||
| 3415 | @var{symbol} as the category when calling @code{display-buffer}, users | ||
| 3416 | can customize how these buffers will be displayed by including such an | ||
| 3417 | entry in @code{display-buffer-alist}. | ||
| 3411 | @end table | 3418 | @end table |
| 3412 | 3419 | ||
| 3413 | By convention, the entries @code{window-height}, @code{window-width} | 3420 | By convention, the entries @code{window-height}, @code{window-width} |