bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16816: 24.3.50; erroneous docstring in with-temp-buffer-window


From: Juanma Barranquero
Subject: bug#16816: 24.3.50; erroneous docstring in with-temp-buffer-window
Date: Thu, 27 Feb 2014 16:32:09 +0100

reopen 16816
quit

On Fri, Feb 21, 2014 at 2:08 PM, martin rudalics <rudalics@gmx.at> wrote:

> `with-temp-buffer-window' should behave as `with-output-to-temp-buffer'
> in this regard (at least I hope so).  So in revision 116509 I moved the
> evaluation of BODY out of the scope of `with-current-buffer'.  If this
> causes problems, I will revert and use your patch.

This breaks with-help-window. Try

 emacs -Q
 C-x C-h

the help output is inserted in the current buffer (*scratch*, in this case).

This patch fixes it.

=== modified file 'lisp/help.el'
--- lisp/help.el 2014-02-10 01:34:22 +0000
+++ lisp/help.el 2014-02-27 15:29:05 +0000
@@ -1207,7 +1207,8 @@
    (temp-buffer-window-show-hook
     (cons 'help-mode-finish temp-buffer-window-show-hook)))
        (with-temp-buffer-window
- ,buffer-name nil 'help-window-setup (progn ,@body)))))
+ ,buffer-name nil 'help-window-setup
+ (with-current-buffer ,buffer-name ,@body)))))

 ;; Called from C, on encountering `help-char' when reading a char.
 ;; Don't print to *Help*; that would clobber Help history.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]