master b29e45ff330: Mention new variable 'display-buffer-default-alist' in a few more places

Martin Rudalics via Mailing list for Emacs changes <[email protected]>
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: master
commit b29e45ff33037204f855bbc28c5716463dbc2f17
Author: Martin Rudalics <[email protected]>
Commit: Martin Rudalics <[email protected]>

    Mention new variable 'display-buffer-default-alist' in a few more places
    
    * lisp/window.el (display-buffer): In doc-string mention
    new variable 'display-buffer-default-alist'.
    * doc/lispref/windows.texi (Choosing Window)
    (Buffer Display Action Alists): Mention new variable
    'display-buffer-default-alist' in a few more places.
---
 doc/lispref/windows.texi | 28 +++++++++++++++-------------
 lisp/window.el           | 23 ++++++++++++-----------
 2 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index aed1eeca5da..908c7f63d17 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -3203,10 +3203,10 @@ use @code{derived-mode} or @code{major-mode} as condition,
 @code{display-buffer} is called before the major mode of the buffer is
 set.
 
-If the caller of @code{display-buffer} passes a category as a symbol
-in its @var{action} argument, then you can use the same category in
-@code{display-buffer-alist} to match buffers with different names,
-for example:
+If the caller of @code{display-buffer} passes a category as a symbol in
+its @var{action} argument, then you can use the same category in
+@code{display-buffer-alist} and @code{display-buffer-default-alist} to
+match buffers with different names, for example:
 
 @example
 @group
@@ -3224,10 +3224,10 @@ for example:
 @xref{Buffer List, @code{buffer-match-p}}.
 
 Regardless of the displayed buffer's name the caller defines a category
-as a symbol @code{comint}.  Then @code{display-buffer-alist} matches
-this category for all buffers displayed with the same category.
-This avoids the need to construct a complex regular expression
-that matches a buffer name.
+as a symbol @code{comint}.  Then @code{display-buffer-alist} and
+@code{display-buffer-default-alist} match this category for all buffers
+displayed with the same category.  This avoids the need to construct a
+complex regular expression that matches a buffer name.
 
 You can also match on the command now being executed.  This is useful
 when different commands display buffers with the same name, but you want
@@ -4077,13 +4077,15 @@ windows were selected afterwards within this command.
 @vindex category@r{, a buffer display action alist entry}
 @item category
 If the caller of @code{display-buffer} passes an alist entry
-@w{@code{(category . @var{symbol})}} in its @var{action} argument, then you
-can match the displayed buffer by using the same category symbol in the
-condition part of @code{display-buffer-alist} entries.  @xref{Buffer
-List, @code{buffer-match-p}}.  Thus, if a Lisp program uses a particular
+@w{@code{(category . @var{symbol})}} in its @var{action} argument, then
+you can match the displayed buffer by using the same category symbol in
+the condition part of @code{display-buffer-alist} and
+@code{display-buffer-default-alist} entries.  @xref{Buffer List,
+@code{buffer-match-p}}.  Thus, if a Lisp program uses a particular
 @var{symbol} as the category when calling @code{display-buffer}, users
 can customize how these buffers will be displayed by including such an
-entry in @code{display-buffer-alist}.
+entry in @code{display-buffer-alist}.  Programs can let-bind
+@code{display-buffer-default-alist} to achieve the same effect.
 
 @vindex tab-name@r{, a buffer display action alist entry}
 @item tab-name
diff --git a/lisp/window.el b/lisp/window.el
index dbd72e7bf6c..c9427dbdfc1 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -8242,14 +8242,15 @@ window.  An action alist is an association list mapping symbols
 to values.  Action functions use the action alist passed to them
 to fine-tune their behaviors.
 
-`display-buffer' builds a list of action functions and an action
-alist by combining any action functions and alists specified by
-`display-buffer-overriding-action', `display-buffer-alist', the
-ACTION argument, `display-buffer-base-action', and
-`display-buffer-fallback-action' (in order).  Then it calls each
-function in the combined function list in turn, passing the
-buffer as the first argument and the combined action alist as the
-second argument, until one of the functions returns non-nil.
+`display-buffer' builds a list of action functions and an action alist
+by combining any action functions and alists specified by
+`display-buffer-overriding-action', `display-buffer-alist',
+`display-buffer-default-alist', the ACTION argument,
+`display-buffer-base-action', and `display-buffer-fallback-action' (in
+order).  Then it calls each function in the combined function list in
+turn, passing the buffer as the first argument and the combined action
+alist as the second argument, until one of the functions returns
+non-nil.
 
 See above for the action functions and the action they try to
 perform.
@@ -8374,9 +8375,9 @@ Action alist entries are:
     selected regardless of which windows were selected afterwards within
     this command.
  `category' -- If the caller of `display-buffer' passes an alist entry
-    `(category . symbol)' in its action argument, then you can match
-    the displayed buffer by using the same category in the condition
-    part of `display-buffer-alist' entries.
+    `(category . symbol)' in its action argument, then you can match the
+    displayed buffer by using the same category in the condition part of
+    `display-buffer-alist' and `display-buffer-default-alist' entries.
  `tab-name' -- If non-nil, specifies the name of the tab in which to
     display the buffer; see `display-buffer-in-new-tab'.
  \\+`tab-group' -- If non-nil, specifies the tab group to use when creating
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.