aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJuri Linkov2020-03-30 01:57:36 +0300
committerJuri Linkov2020-03-30 01:57:36 +0300
commit3273e2ace788a58bef77cef936021d151815ea94 (patch)
tree0bb97e42c356ba9fee04879fc9f439634819252a /doc
parent7a6f5a5167037cdc3a0e9e312393781daedec085 (diff)
downloademacs-3273e2ace788a58bef77cef936021d151815ea94.tar.gz
emacs-3273e2ace788a58bef77cef936021d151815ea94.zip
Deprecate with-displayed-buffer-window, use body-function instead (bug#39822)
* doc/lispref/display.texi (Temporary Displays): Remove defmac with-displayed-buffer-window. * doc/lispref/windows.texi (Buffer Display Action Alists): Add body-function. * lisp/window.el (with-displayed-buffer-window): Declare macro obsolete. (window--display-buffer): Call 'body-function' after displaying the buffer. * lisp/dired.el (dired-mark-pop-up): * lisp/files.el (save-buffers-kill-emacs): * lisp/minibuffer.el (minibuffer-completion-help): Replace with-displayed-buffer-window with with-current-buffer-window and add action alist entry 'body-function' with former macro body.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/display.texi6
-rw-r--r--doc/lispref/windows.texi9
2 files changed, 9 insertions, 6 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 2b25d6023cd..9fbf995d7e4 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -1318,12 +1318,6 @@ the buffer specified by @var{buffer-or-name} current for running
1318@var{body}. 1318@var{body}.
1319@end defmac 1319@end defmac
1320 1320
1321@defmac with-displayed-buffer-window buffer-or-name action quit-function &rest body
1322This macro is like @code{with-current-buffer-window} but unlike that
1323displays the buffer specified by @var{buffer-or-name} @emph{before}
1324running @var{body}.
1325@end defmac
1326
1327A window showing a temporary buffer can be fitted to the size of that 1321A window showing a temporary buffer can be fitted to the size of that
1328buffer using the following mode: 1322buffer using the following mode:
1329 1323
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index d0791d40196..00142d87dcc 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -3048,6 +3048,15 @@ since there is no guarantee that an arbitrary caller of
3048@code{display-buffer} will be able to handle the case that no window 3048@code{display-buffer} will be able to handle the case that no window
3049will display the buffer. @code{display-buffer-no-window} is the only 3049will display the buffer. @code{display-buffer-no-window} is the only
3050action function that cares about this entry. 3050action function that cares about this entry.
3051
3052@vindex body-function@r{, a buffer display action alist entry}
3053@item body-function
3054The value must be a function taking one argument (a displayed window).
3055This function can be used to fill the displayed window's body with
3056some contents. It is called @emph{after} the buffer is displayed, and
3057@emph{before} the entries @code{window-height}, @code{window-width}
3058and @code{preserve-size} are applied that could resize the window
3059to fit it to the inserted contents.
3051@end table 3060@end table
3052 3061
3053By convention, the entries @code{window-height}, @code{window-width} 3062By convention, the entries @code{window-height}, @code{window-width}