* 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
+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):
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
---------- 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}
@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
;; @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).
(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