Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
65463c40
Commit
65463c40
authored
Nov 16, 2012
by
Glenn Morris
Browse files
* lisp/window.el (with-temp-buffer-window): Doc fix.
parent
86dcf21c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/window.el
lisp/window.el
+12
-13
No files found.
lisp/ChangeLog
View file @
65463c40
2012-11-17 Glenn Morris <rgm@gnu.org>
* window.el (with-temp-buffer-window): Doc fix.
2012-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/cl-lib.el: Set more meaningful version number.
...
...
lisp/window.el
View file @
65463c40
...
...
@@ -147,12 +147,12 @@ to `display-buffer'."
BUFFER-OR-NAME must specify either a live buffer, or the name of a
buffer (if it does not exist, this macro creates it).
Make sure
the specified buffer
is empty before evaluating BODY.
Do not make that buffer current for BODY. Instead, bind
`standard-output' to that buffer, so that output generated with
`prin1' and similar functions in BODY goes
into th
at
buffer.
This first empties
the specified buffer
. It does not make the
buffer current, but rather binds `standard-output', so that
output generated with `prin1' and similar functions in BODY goes
into th
e
buffer.
After evaluating BODY, t
his
marks the specified buffer unmodified and
After evaluating BODY,
i
t marks the specified buffer unmodified and
read-only, and displays it in a window via `display-buffer', passing
ACTION as the action argument to `display-buffer'. It automatically
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 -
the window showing the specified buffer and the value returned by
BODY - and returns the value returned by that function.
Since this macro calls `display-buffer', the window displaying
the buffer is usually not selected and the specified buffer
usually not made current. QUIT-FUNCTION can override that.
If the buffer is displayed on a new frame, the window manager may
decide to select that frame. In that case, it's usually a good
strategy if
the function specified by QUIT-FUNCTION selects the
window showing the buffer
before reading a value from the
minibuffer; for example, when
asking a `yes-or-no-p' question.
strategy if
QUIT-FUNCTION selects the window showing the buffer
before reading a
ny
value from the
minibuffer; for example, when
asking a `yes-or-no-p' question.
This construct is similar to `with-output-to-temp-buffer', but does
not put the buffer in help mode, or call `temp-buffer-show-function'.
It also runs different hooks, namely `temp-buffer-window-setup-hook'
\(with the specified buffer current) and `temp-buffer-window-show-hook'
\(with the specified buffer current and the window showing it selected).
Since this macro calls `display-buffer', the window displaying
the buffer is usually not selected and the specified buffer
usually not made current. QUIT-FUNCTION can override that."
\(with the specified buffer current and the window showing it selected)."
(declare (debug t))
(let ((buffer (make-symbol "buffer"))
(window (make-symbol "window"))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment