[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Command `vc-annotate' runs `help-mode-hook'?
From: |
Okam |
Subject: |
Re: Command `vc-annotate' runs `help-mode-hook'? |
Date: |
Fri, 16 Oct 2020 21:06:10 +0000 |
On 10/14/20 2:40 AM, Michael Heerdegen wrote:
>> I was trying to add a function to `help-mode-hook' to automatically
>> rename the "*Help*" buffer.
>
> May I ask why you want to rename it? I guess it could cause other
> problems.
I found a package that renamed Help buffers to include the name of the
variable/function being shown, but saw that this broke `vc-annotate'
This is helpful when I want to refer to multiple "*Help*" buffers.
>> Why does `vc-annotate' run `help-mode-hook'
>
> That probably comes from `vc-annotate' calling
> `with-output-to-temp-buffer'. I don't recall why it had been decided
> that this macro performs help-mode setup, but it does.
Thank you.
>> and is there a good way of detecting this and similar cases?
>
> You could look at the buffer name? The answer depends on the set of
> cases you want to handle.
This makes sense. I wasn't sure whether doing so would also have
unexpected behavior.
With thanks,
Okam