aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEli Zaretskii2024-11-21 12:28:26 +0200
committerEli Zaretskii2024-11-21 12:28:26 +0200
commit3eb3018682595208076fe7beea1175e123cf1966 (patch)
tree28d62c1579dacdd989ea1be90d1332e9044ff3a6 /doc
parent4d80c4f4858916becd528b236b29085d29cf3706 (diff)
downloademacs-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.texi6
-rw-r--r--doc/lispref/windows.texi13
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
1000using @code{derived-mode} instead, when both can work. Note that this 1000using @code{derived-mode} instead, when both can work. Note that this
1001condition might fail to report a match if @code{buffer-match-p} is 1001condition might fail to report a match if @code{buffer-match-p} is
1002invoked before the major mode of the buffer has been established. 1002invoked before the major mode of the buffer has been established.
1003@item category
1004This is pertinent only when this function is called by
1005@code{display-buffer} (@pxref{Buffer Display Action Alists}), and is
1006satisfied if the action alist with which @code{display-buffer} was
1007called 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
1005Satisfied by any buffer. A convenient alternative to @code{""} (empty 1011Satisfied 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
2659Regardless of the displayed buffer's name the caller defines a category 2662Regardless of the displayed buffer's name the caller defines a category
2660as a symbol @code{comint}. Then @code{display-buffer-alist} matches 2663as a symbol @code{comint}. Then @code{display-buffer-alist} matches
2661this category for all buffers displayed with the same category. 2664this 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
3407If the caller of @code{display-buffer} passes an alist entry 3410If 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
3409match the displayed buffer by using the same category in the condition 3412can match the displayed buffer by using the same category symbol in the
3410part of @code{display-buffer-alist} entries. 3413condition part of @code{display-buffer-alist} entries. @xref{Buffer
3414List, @code{buffer-match-p}}. Thus, if a Lisp program uses a particular
3415@var{symbol} as the category when calling @code{display-buffer}, users
3416can customize how these buffers will be displayed by including such an
3417entry in @code{display-buffer-alist}.
3411@end table 3418@end table
3412 3419
3413By convention, the entries @code{window-height}, @code{window-width} 3420By convention, the entries @code{window-height}, @code{window-width}