Variable: display-buffer-alist

display-buffer-alist is a customizable variable defined in window.el.gz.

Value

nil

Documentation

Alist of user-defined conditional actions for display-buffer.

Its value takes effect before processing the ACTION argument of display-buffer and before display-buffer-base-action and display-buffer-fallback-action, but after display-buffer-overriding-action, which see.

If non-nil, this is an alist of elements (CONDITION . ACTION), where:

 CONDITION is either a regexp matching buffer names, or a
  function that takes two arguments - a buffer name and the
  ACTION argument of display-buffer - and returns a boolean.

 ACTION is a cons cell (FUNCTIONS . ALIST), where FUNCTIONS is an
  action function or a list of action functions and ALIST is an
  action alist. Each such action function should accept two
  arguments: a buffer to display and an alist of the same form as
  ALIST. See display-buffer for details.

display-buffer scans this alist until it either finds a matching regular expression or the function specified by a condition returns non-nil. In any of these cases, it adds the associated action to the list of actions it will try.

This variable was added, or its default value changed, in Emacs 24.1.

Probably introduced at or before Emacs version 24.1.

Source Code

;; Defined in /usr/src/emacs/lisp/window.el.gz
(defcustom display-buffer-alist nil
  "Alist of user-defined conditional actions for `display-buffer'.
Its value takes effect before processing the ACTION argument of
`display-buffer' and before `display-buffer-base-action' and
`display-buffer-fallback-action', but after
`display-buffer-overriding-action', which see.

If non-nil, this is an alist of elements (CONDITION . ACTION),
where:

 CONDITION is either a regexp matching buffer names, or a
  function that takes two arguments - a buffer name and the
  ACTION argument of `display-buffer' - and returns a boolean.

 ACTION is a cons cell (FUNCTIONS . ALIST), where FUNCTIONS is an
  action function or a list of action functions and ALIST is an
  action alist.  Each such action function should accept two
  arguments: a buffer to display and an alist of the same form as
  ALIST.  See `display-buffer' for details.

`display-buffer' scans this alist until it either finds a
matching regular expression or the function specified by a
condition returns non-nil.  In any of these cases, it adds the
associated action to the list of actions it will try."
  :type `(alist :key-type
		(choice :tag "Condition"
			regexp
			(function :tag "Matcher function"))
		:value-type ,display-buffer--action-custom-type)
  :risky t
  :version "24.1"
  :group 'windows)