diff options
| author | Glenn Morris | 2012-11-16 20:26:24 -0500 |
|---|---|---|
| committer | Glenn Morris | 2012-11-16 20:26:24 -0500 |
| commit | 65463c4091fe92fd09295bcbbc38dcd18fa41a16 (patch) | |
| tree | 0983a6b41e32a6a34510276725aedc79f43ef859 | |
| parent | 86dcf21c0749f699678e42a605044d99de36dd28 (diff) | |
| download | emacs-65463c4091fe92fd09295bcbbc38dcd18fa41a16.tar.gz emacs-65463c4091fe92fd09295bcbbc38dcd18fa41a16.zip | |
* lisp/window.el (with-temp-buffer-window): Doc fix.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/window.el | 25 |
2 files changed, 16 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 343ea621e9e..416f0d0ec47 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-11-17 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * window.el (with-temp-buffer-window): Doc fix. | ||
| 4 | |||
| 1 | 2012-11-16 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2012-11-16 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 6 | ||
| 3 | * emacs-lisp/cl-lib.el: Set more meaningful version number. | 7 | * emacs-lisp/cl-lib.el: Set more meaningful version number. |
diff --git a/lisp/window.el b/lisp/window.el index 9ac3a4ecda0..486bb166fc1 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -147,12 +147,12 @@ to `display-buffer'." | |||
| 147 | BUFFER-OR-NAME must specify either a live buffer, or the name of a | 147 | BUFFER-OR-NAME must specify either a live buffer, or the name of a |
| 148 | buffer (if it does not exist, this macro creates it). | 148 | buffer (if it does not exist, this macro creates it). |
| 149 | 149 | ||
| 150 | Make sure the specified buffer is empty before evaluating BODY. | 150 | This first empties the specified buffer. It does not make the |
| 151 | Do not make that buffer current for BODY. Instead, bind | 151 | buffer current, but rather binds `standard-output', so that |
| 152 | `standard-output' to that buffer, so that output generated with | 152 | output generated with `prin1' and similar functions in BODY goes |
| 153 | `prin1' and similar functions in BODY goes into that buffer. | 153 | into the buffer. |
| 154 | 154 | ||
| 155 | After evaluating BODY, this marks the specified buffer unmodified and | 155 | After evaluating BODY, it marks the specified buffer unmodified and |
| 156 | read-only, and displays it in a window via `display-buffer', passing | 156 | read-only, and displays it in a window via `display-buffer', passing |
| 157 | ACTION as the action argument to `display-buffer'. It automatically | 157 | ACTION as the action argument to `display-buffer'. It automatically |
| 158 | shrinks the relevant window if `temp-buffer-resize-mode' is enabled. | 158 | shrinks the relevant window if `temp-buffer-resize-mode' is enabled. |
| @@ -162,21 +162,20 @@ a function. In that case, runs the function with two arguments - | |||
| 162 | the window showing the specified buffer and the value returned by | 162 | the window showing the specified buffer and the value returned by |
| 163 | BODY - and returns the value returned by that function. | 163 | BODY - and returns the value returned by that function. |
| 164 | 164 | ||
| 165 | Since this macro calls `display-buffer', the window displaying | ||
| 166 | the buffer is usually not selected and the specified buffer | ||
| 167 | usually not made current. QUIT-FUNCTION can override that. | ||
| 165 | If the buffer is displayed on a new frame, the window manager may | 168 | If the buffer is displayed on a new frame, the window manager may |
| 166 | decide to select that frame. In that case, it's usually a good | 169 | decide to select that frame. In that case, it's usually a good |
| 167 | strategy if the function specified by QUIT-FUNCTION selects the | 170 | strategy if QUIT-FUNCTION selects the window showing the buffer |
| 168 | window showing the buffer before reading a value from the | 171 | before reading any value from the minibuffer; for example, when |
| 169 | minibuffer; for example, when asking a `yes-or-no-p' question. | 172 | asking a `yes-or-no-p' question. |
| 170 | 173 | ||
| 171 | This construct is similar to `with-output-to-temp-buffer', but does | 174 | This construct is similar to `with-output-to-temp-buffer', but does |
| 172 | not put the buffer in help mode, or call `temp-buffer-show-function'. | 175 | not put the buffer in help mode, or call `temp-buffer-show-function'. |
| 173 | It also runs different hooks, namely `temp-buffer-window-setup-hook' | 176 | It also runs different hooks, namely `temp-buffer-window-setup-hook' |
| 174 | \(with the specified buffer current) and `temp-buffer-window-show-hook' | 177 | \(with the specified buffer current) and `temp-buffer-window-show-hook' |
| 175 | \(with the specified buffer current and the window showing it selected). | 178 | \(with the specified buffer current and the window showing it selected)." |
| 176 | |||
| 177 | Since this macro calls `display-buffer', the window displaying | ||
| 178 | the buffer is usually not selected and the specified buffer | ||
| 179 | usually not made current. QUIT-FUNCTION can override that." | ||
| 180 | (declare (debug t)) | 179 | (declare (debug t)) |
| 181 | (let ((buffer (make-symbol "buffer")) | 180 | (let ((buffer (make-symbol "buffer")) |
| 182 | (window (make-symbol "window")) | 181 | (window (make-symbol "window")) |