Commit 2cc775f9 authored by Chong Yidong's avatar Chong Yidong
Browse files

Doc fixes for save-window-excursion.

* lisp/subr.el (save-window-excursion): Doc fix.

* doc/lispref/windows.texi (Window Configurations): save-window-excursion is
now a macro.

* doc/lispref/display.texi (Temporary Displays): with-output-to-temp-buffer is
now a macro.

Fixes: debbugs:9979
parent 0c93eabf
2012-03-11 Chong Yidong <cyd@gnu.org>
* windows.texi (Window Configurations): save-window-excursion is
now a macro.
* display.texi (Temporary Displays): with-output-to-temp-buffer is
now a macro.
2012-03-10 Eli Zaretskii <eliz@gnu.org>
* strings.texi (String Basics):
......
......@@ -1031,7 +1031,7 @@ You can use a display table to substitute other text for the ellipsis
buffer and then present it to the user for perusal rather than for
editing. Many help commands use this feature.
@defspec with-output-to-temp-buffer buffer-name forms@dots{}
@defmac with-output-to-temp-buffer buffer-name forms@dots{}
This function executes @var{forms} while arranging to insert any output
they print into the buffer named @var{buffer-name}, which is first
created if necessary, and put into Help mode. Finally, the buffer is
......@@ -1083,7 +1083,7 @@ The value of the last form in @var{forms} is returned.
---------- Buffer: foo ----------
@end group
@end example
@end defspec
@end defmac
@defopt temp-buffer-show-function
If this variable is non-@code{nil}, @code{with-output-to-temp-buffer}
......
......@@ -3142,7 +3142,7 @@ as @code{save-window-excursion}:
@end example
@end defun
@defspec save-window-excursion forms@dots{}
@defmac save-window-excursion forms@dots{}
This special form records the window configuration, executes @var{forms}
in sequence, then restores the earlier window configuration. The window
configuration includes, for each window, the value of point and the
......@@ -3179,7 +3179,7 @@ For example:
;; @r{The screen is now split again.}
@end group
@end example
@end defspec
@end defmac
@defun window-configuration-p object
This function returns @code{t} if @var{object} is a window configuration.
......
2012-03-11 Chong Yidong <cyd@gnu.org>
* subr.el (save-window-excursion): Doc fix (Bug#9979).
* dabbrev.el (dabbrev--find-expansion): Update progress reporter
when finished (Bug#10963).
......
......@@ -3026,13 +3026,12 @@ the buffer list."
(set-buffer ,old-buffer))))))
(defmacro save-window-excursion (&rest body)
"Execute BODY, preserving window sizes and contents.
"Execute BODY, then restore previous window configuration.
Return the value of the last form in BODY.
Restore which buffer appears in which window, where display starts,
and the value of point and mark for each window.
Also restore the choice of selected window.
Also restore which buffer is current.
Does not restore the value of point in current buffer.
Restore which buffer appears in which window, where display
starts, and the value of point and mark for each window, as well
as the choice of selected window, and which buffer is current.
The value of point in the current buffer is not restored.
BEWARE: Most uses of this macro introduce bugs.
E.g. it should not be used to try and prevent some code from opening
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment