[Top][All Lists]

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

bug#8368: 24.0.50; "temp" means "help" - rename or at least document

From: martin rudalics
Subject: bug#8368: 24.0.50; "temp" means "help" - rename or at least document
Date: Mon, 30 Apr 2012 11:40:24 +0200

>> You don't have to remove and re-add any hooks.  It's
>> sufficient to turn off help mode in the body of
>> `with-output-to-temp-buffer'.  Similarly,
>> if you don't want to run `completion-list-mode-finish', turn off
>> `completion-list-mode' in the buffer.
> Sufficient?  That sounds like more work, not less.  Why turn help mode etc. on
> automatically and then turn it off again.  Why not just remove the hook so it
> does not get turned on?

Because it's non-trivial to "just" do that.  We have to go through all
users of `with-output-to-temp-buffer' and check whether they want to
turn on help mode or not.  I don't have the slightest idea whether, for
example, the calls in ada-xref.el require activating help mode or not.

> I'm probably missing something in what you're
> suggesting.

No.  But you earlier said that

> While waiting for that, users have to do something like this, just to get rid 
> the *Help*-imposed stuff:
> (defmacro with-output-to-plain-temp-buffer (buf &rest body)
>   "Like `with-output-to-temp-buffer', but with no *Help* navigation stuff."
>   `(unwind-protect
>     (progn
>       (remove-hook 'temp-buffer-setup-hook 'help-mode-setup)
>       (remove-hook 'temp-buffer-show-hook  'help-mode-finish)
>       (with-output-to-temp-buffer ,buf ,@body))
>     (add-hook 'temp-buffer-setup-hook 'help-mode-setup)
>     (add-hook 'temp-buffer-show-hook  'help-mode-finish)))

and I simply explained that there's an easier way to achieve what you
want.  Obviously, dealing with `temp-buffer-show-hook' in
`with-output-to-plain-temp-buffer' isn't necessary either if you don't
run `help-mode-setup' before.


reply via email to

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