From f0cfa5feabab3986c002e55c1c6825f3c206d5c2 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Wed, 20 Nov 2013 10:44:38 +0800 Subject: [PATCH] * doc/lispref/windows.texi (Choosing Window): Mention `no-display-ok'. * etc/NEWS: Mention new display action alist entry `no-display-ok'. (Bug#13594) * lisp/window.el (display-buffer-alist): Doc fix. (Bug#13594) --- doc/lispref/ChangeLog | 4 ++++ doc/lispref/windows.texi | 5 ++++- etc/ChangeLog | 5 +++++ etc/NEWS | 4 ++++ lisp/ChangeLog | 4 ++++ lisp/window.el | 14 ++++++++------ 6 files changed, 29 insertions(+), 7 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index e298f79d1c0..16ee55a173c 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2013-11-20 Leo Liu + + * windows.texi (Choosing Window): Mention `no-display-ok'. (Bug#13594) + 2013-11-19 Xue Fuqiao * os.texi (File Notifications): Add an index. diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 13c9ca53222..8f592dfebb3 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -1842,7 +1842,10 @@ The constant @code{display-buffer-fallback-action}. @noindent Each action function is called 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-@code{nil}. +until one of the functions returns non-@code{nil}. The caller can +pass @code{(no-display-ok . t)} as an element of the action alist to +indicate its readiness to handle the case of not displaying the +buffer. The argument @var{action} can also have a non-@code{nil}, non-list value. This has the special meaning that the buffer should be diff --git a/etc/ChangeLog b/etc/ChangeLog index 120f4d4db1c..faa369c40fb 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,8 @@ +2013-11-20 Leo Liu + + * NEWS: Mention new display action alist entry `no-display-ok'. + (Bug#13594) + 2013-11-18 Leo Liu * NEWS: Mention new features for Octave mode. diff --git a/etc/NEWS b/etc/NEWS index 9772f97045a..33103f72775 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1800,6 +1800,10 @@ reused. *** New option `switch-to-buffer-preserve-window-point' to restore a window's point when switching buffers. +*** New display action alist entry `no-display-ok' to indicate the +caller of `display-buffer' is ready to handle the case of not +displaying the buffer. + *** New display action alist entries `window-height' and `window-width' specify the size of new windows created by `display-buffer'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d052406332a..3bfc413bcd1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-11-20 Leo Liu + + * window.el (display-buffer-alist): Doc fix. (Bug#13594) + 2013-11-19 Dan Nicolaescu * vc/vc-git.el (vc-git-dir-extra-headers): Add headers diff --git a/lisp/window.el b/lisp/window.el index ad74afed027..ac9311b2dbf 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5355,15 +5355,17 @@ This is a list of elements (CONDITION . ACTION), where: ACTION is a cons cell (FUNCTION . ALIST), where FUNCTION is a function or a list of functions. Each such function should accept two arguments: a buffer to display and an alist of the - same form as ALIST. If (no-display-ok . t) is in ALIST, the - caller is prepared for the case of not displaying the buffer - and FUNCTION can safely return a non-window value to suppress - displaying. See `display-buffer' for details. + 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." +condition returns non-nil. It can pass (no-display-ok . t) in +its action alist to indicate readiness for the case of not +displaying the buffer and FUNCTION can safely return a non-window +value to suppress displaying. + +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 -- 2.39.2