[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116606: Revert recent with-temp-buffer-window chang
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] trunk r116606: Revert recent with-temp-buffer-window change (Bug#16816, Bug#16882). |
Date: |
Fri, 28 Feb 2014 09:11:18 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116606
revision-id: address@hidden
parent: address@hidden
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Fri 2014-02-28 10:10:55 +0100
message:
Revert recent with-temp-buffer-window change (Bug#16816, Bug#16882).
* window.el (with-temp-buffer-window): Revert change from
2014-02-21. Suggested by Thierry Volpiatto
<address@hidden>. Fix doc-string based on a
suggestion by Nicolas Richard <address@hidden>.
* help.el (with-help-window): Fix doc-string.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/help.el help.el-20091113204419-o5vbwnq5f7feedwu-280
lisp/window.el window.el-20091113204419-o5vbwnq5f7feedwu-94
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-02-28 08:49:59 +0000
+++ b/lisp/ChangeLog 2014-02-28 09:10:55 +0000
@@ -1,7 +1,16 @@
+2014-02-28 Martin Rudalics <address@hidden>
+
+ Revert recent with-temp-buffer-window change (Bug#16816, Bug#16882).
+ * window.el (with-temp-buffer-window): Revert change from
+ 2014-02-21. Suggested by Thierry Volpiatto
+ <address@hidden>. Fix doc-string based on a
+ suggestion by Nicolas Richard <address@hidden>.
+ * help.el (with-help-window): Fix doc-string.
+
2014-02-28 Ivan Kanis <address@hidden>
- * net/shr.el (shr-put-image): add custom variable
- `shr-image-animate' to turn off image animation. It is so slow it
+ * net/shr.el (shr-put-image): Add custom variable
+ `shr-image-animate' to turn off image animation. It is so slow it
will render emacs unusable.
2014-02-28 Michael Albinus <address@hidden>
@@ -3304,7 +3313,8 @@
* emacs-lisp/debug.el (debug): Use window-total-height instead
of window-total-size.
* frame.el (tool-bar-lines-needed): Defalias to tool-bar-height.
- * help.el (describe-bindings-internal): Call help-buffer
+ * help.el (describe-bindings-internal): Use help-buffer as
+ argument for with-help-window.
(temp-buffer-max-width): New option.
(resize-temp-buffer-window, help-window-setup)
(with-help-window): Rewrite.
=== modified file 'lisp/help.el'
--- a/lisp/help.el 2014-02-10 01:34:22 +0000
+++ b/lisp/help.el 2014-02-28 09:10:55 +0000
@@ -1194,9 +1194,14 @@
;; Note: It's usually always wrong to use `help-print-return-message' in
;; the body of `with-help-window'.
(defmacro with-help-window (buffer-name &rest body)
- "Display buffer with name BUFFER-NAME in a help window evaluating BODY.
-Select help window if the current value of the user option
-`help-window-select' says so. Return last value in BODY."
+ "Display buffer with name BUFFER-NAME in a help window.
+Evaluate the forms in BODY with the buffer specified by
+BUFFER-NAME current, put that buffer in `help-mode', display the
+buffer in a window (see `with-temp-buffer-window' for details)
+and issue a message how to deal with that \"help\" window when
+it's no more needed. Select the help window if the current value
+of the user option `help-window-select' says so. Return last
+value in BODY."
(declare (indent 1) (debug t))
`(progn
;; Make `help-window-point-marker' point nowhere. The only place
=== modified file 'lisp/window.el'
--- a/lisp/window.el 2014-02-21 11:04:27 +0000
+++ b/lisp/window.el 2014-02-28 09:10:55 +0000
@@ -142,28 +142,27 @@
;; Return the window.
window))))
-;; Doc is very similar to with-output-to-temp-buffer.
(defmacro with-temp-buffer-window (buffer-or-name action quit-function &rest
body)
- "Bind `standard-output' to BUFFER-OR-NAME, eval BODY, show the 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).
-
-This construct makes buffer BUFFER-OR-NAME empty before running BODY.
-It does not make the buffer current for BODY.
-Instead it binds `standard-output' to that buffer, so that output
-generated with `prin1' and similar functions in BODY goes into
-the buffer.
-
-At the end of BODY, this marks the specified buffer unmodified and
-read-only, and displays it in a window (but does not select it, or make
-the buffer current). The display happens by calling `display-buffer'
-with the ACTION argument. If `temp-buffer-resize-mode' is enabled,
-the relevant window shrinks automatically.
-
-This returns the value returned by BODY, unless QUIT-FUNCTION specifies
-a function. In that case, it runs the function with two arguments -
+ "Evaluate BODY in a buffer BUFFER-OR-NAME and show that 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 the buffer specified by BUFFER-OR-NAME empty before running
+BODY and make that buffer current for running the forms in BODY.
+In addition, bind `standard-output' to that buffer, so that
+output generated with `prin1' and similar functions in BODY goes
+into that buffer.
+
+At the end of BODY, mark the specified buffer unmodified and
+read-only, and display it in a window (but do not select it).
+The display happens by calling `display-buffer' passing it the
+ACTION argument. If `temp-buffer-resize-mode' is enabled, the
+corresponding window may shrink automatically.
+
+Return the value returned by BODY, unless QUIT-FUNCTION specifies
+a function. In that case, run that function with two arguments -
the window showing the specified buffer and the value returned by
-BODY - and returns the value returned by that function.
+BODY - and return the value returned by that function.
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
@@ -172,16 +171,16 @@
asking a `yes-or-no-p' question.
This runs the hook `temp-buffer-window-setup-hook' before BODY,
-with the specified buffer temporarily current. It runs the
-hook `temp-buffer-window-show-hook' after displaying the buffer,
-with that buffer temporarily current, and the window that was used to
+with the specified buffer temporarily current. It runs the hook
+`temp-buffer-window-show-hook' after displaying the buffer, with
+that buffer temporarily current, and the window that was used to
display it temporarily selected.
-This construct is similar to `with-output-to-temp-buffer', but
-runs different hooks. In particular, it does not run
-`temp-buffer-setup-hook', which usually puts the buffer in Help mode.
-Also, it does not call `temp-buffer-show-function' (the ACTION
-argument replaces this)."
+This construct is similar to `with-output-to-temp-buffer' but,
+unlike that, makes BUFFER-OR-NAME current when running BODY.
+Also, it neither runs `temp-buffer-setup-hook' which usually puts
+the buffer in Help mode, nor `temp-buffer-show-function' (the
+ACTION argument replaces this)."
(declare (debug t))
(let ((buffer (make-symbol "buffer"))
(window (make-symbol "window"))
@@ -189,8 +188,8 @@
`(let* ((,buffer (temp-buffer-window-setup ,buffer-or-name))
(standard-output ,buffer)
,window ,value)
- (setq ,value (progn ,@body))
(with-current-buffer ,buffer
+ (setq ,value (progn ,@body))
(setq ,window (temp-buffer-window-show ,buffer ,action)))
(if (functionp ,quit-function)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116606: Revert recent with-temp-buffer-window change (Bug#16816, Bug#16882).,
Martin Rudalics <=