diff options
| author | Chong Yidong | 2012-03-12 00:10:07 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-03-12 00:10:07 +0800 |
| commit | 2cc775f91d7edf763bf4ad81a777040091d1efc3 (patch) | |
| tree | 34988c7e86f33e45565f3a4e87fb59ad79b091ed | |
| parent | 0c93eabf3580a528e05ccc336df18ea4792d093f (diff) | |
| download | emacs-2cc775f91d7edf763bf4ad81a777040091d1efc3.tar.gz emacs-2cc775f91d7edf763bf4ad81a777040091d1efc3.zip | |
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
| -rw-r--r-- | doc/lispref/ChangeLog | 8 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 4 | ||||
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/subr.el | 11 |
5 files changed, 19 insertions, 10 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 201128b9757..4b4521c4323 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2012-03-11 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * windows.texi (Window Configurations): save-window-excursion is | ||
| 4 | now a macro. | ||
| 5 | |||
| 6 | * display.texi (Temporary Displays): with-output-to-temp-buffer is | ||
| 7 | now a macro. | ||
| 8 | |||
| 1 | 2012-03-10 Eli Zaretskii <eliz@gnu.org> | 9 | 2012-03-10 Eli Zaretskii <eliz@gnu.org> |
| 2 | 10 | ||
| 3 | * strings.texi (String Basics): | 11 | * strings.texi (String Basics): |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 281ddda9cec..c70418be52b 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -1031,7 +1031,7 @@ You can use a display table to substitute other text for the ellipsis | |||
| 1031 | buffer and then present it to the user for perusal rather than for | 1031 | buffer and then present it to the user for perusal rather than for |
| 1032 | editing. Many help commands use this feature. | 1032 | editing. Many help commands use this feature. |
| 1033 | 1033 | ||
| 1034 | @defspec with-output-to-temp-buffer buffer-name forms@dots{} | 1034 | @defmac with-output-to-temp-buffer buffer-name forms@dots{} |
| 1035 | This function executes @var{forms} while arranging to insert any output | 1035 | This function executes @var{forms} while arranging to insert any output |
| 1036 | they print into the buffer named @var{buffer-name}, which is first | 1036 | they print into the buffer named @var{buffer-name}, which is first |
| 1037 | created if necessary, and put into Help mode. Finally, the buffer is | 1037 | 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. | |||
| 1083 | ---------- Buffer: foo ---------- | 1083 | ---------- Buffer: foo ---------- |
| 1084 | @end group | 1084 | @end group |
| 1085 | @end example | 1085 | @end example |
| 1086 | @end defspec | 1086 | @end defmac |
| 1087 | 1087 | ||
| 1088 | @defopt temp-buffer-show-function | 1088 | @defopt temp-buffer-show-function |
| 1089 | If this variable is non-@code{nil}, @code{with-output-to-temp-buffer} | 1089 | If this variable is non-@code{nil}, @code{with-output-to-temp-buffer} |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 07be7fa9079..b541b2419c8 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -3142,7 +3142,7 @@ as @code{save-window-excursion}: | |||
| 3142 | @end example | 3142 | @end example |
| 3143 | @end defun | 3143 | @end defun |
| 3144 | 3144 | ||
| 3145 | @defspec save-window-excursion forms@dots{} | 3145 | @defmac save-window-excursion forms@dots{} |
| 3146 | This special form records the window configuration, executes @var{forms} | 3146 | This special form records the window configuration, executes @var{forms} |
| 3147 | in sequence, then restores the earlier window configuration. The window | 3147 | in sequence, then restores the earlier window configuration. The window |
| 3148 | configuration includes, for each window, the value of point and the | 3148 | configuration includes, for each window, the value of point and the |
| @@ -3179,7 +3179,7 @@ For example: | |||
| 3179 | ;; @r{The screen is now split again.} | 3179 | ;; @r{The screen is now split again.} |
| 3180 | @end group | 3180 | @end group |
| 3181 | @end example | 3181 | @end example |
| 3182 | @end defspec | 3182 | @end defmac |
| 3183 | 3183 | ||
| 3184 | @defun window-configuration-p object | 3184 | @defun window-configuration-p object |
| 3185 | This function returns @code{t} if @var{object} is a window configuration. | 3185 | This function returns @code{t} if @var{object} is a window configuration. |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 49d67384920..b1afb033404 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2012-03-11 Chong Yidong <cyd@gnu.org> | 1 | 2012-03-11 Chong Yidong <cyd@gnu.org> |
| 2 | 2 | ||
| 3 | * subr.el (save-window-excursion): Doc fix (Bug#9979). | ||
| 4 | |||
| 3 | * dabbrev.el (dabbrev--find-expansion): Update progress reporter | 5 | * dabbrev.el (dabbrev--find-expansion): Update progress reporter |
| 4 | when finished (Bug#10963). | 6 | when finished (Bug#10963). |
| 5 | 7 | ||
diff --git a/lisp/subr.el b/lisp/subr.el index 00a030c744c..866535ce882 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -3026,13 +3026,12 @@ the buffer list." | |||
| 3026 | (set-buffer ,old-buffer)))))) | 3026 | (set-buffer ,old-buffer)))))) |
| 3027 | 3027 | ||
| 3028 | (defmacro save-window-excursion (&rest body) | 3028 | (defmacro save-window-excursion (&rest body) |
| 3029 | "Execute BODY, preserving window sizes and contents. | 3029 | "Execute BODY, then restore previous window configuration. |
| 3030 | Return the value of the last form in BODY. | 3030 | Return the value of the last form in BODY. |
| 3031 | Restore which buffer appears in which window, where display starts, | 3031 | Restore which buffer appears in which window, where display |
| 3032 | and the value of point and mark for each window. | 3032 | starts, and the value of point and mark for each window, as well |
| 3033 | Also restore the choice of selected window. | 3033 | as the choice of selected window, and which buffer is current. |
| 3034 | Also restore which buffer is current. | 3034 | The value of point in the current buffer is not restored. |
| 3035 | Does not restore the value of point in current buffer. | ||
| 3036 | 3035 | ||
| 3037 | BEWARE: Most uses of this macro introduce bugs. | 3036 | BEWARE: Most uses of this macro introduce bugs. |
| 3038 | E.g. it should not be used to try and prevent some code from opening | 3037 | E.g. it should not be used to try and prevent some code from opening |