emacs-devel
[Top][All Lists]
Advanced

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

Re: Info-mode patch


From: Arthur Miller
Subject: Re: Info-mode patch
Date: Mon, 26 Jun 2023 22:17:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Juri Linkov <juri@linkov.net> writes:

>> -(defun Info-directory ()
>> +(defun Info-directory (&optional window)
>>    "Go to the Info directory node."
>>    (interactive)
>> -  (Info-find-node "dir" "top"))
>> +  (with-selected-window (or window (info-window))
>> +    (Info-find-node "dir" "top")))
>
> I wonder why you modified a lot of commands instead of implementing
> a non-intrusive approach of creating standard wrapper commands like
>
>   (defun Info-directory-other-window (&optional window)
>      "Go to the Info directory node in another window."
>      (interactive)
>      (with-selected-window (or window (info-window))
>        (Info-directory)))

Can you control on which frame the input goes when prompted by original
function with a wrapper approach? I changed quite few prompts a wrapped stuff
with both with-current-buffer, and with-selected-frame to achive that. I don't
think I could do that if I wrapped stuff. But what do I know, perhaps there is
some way?

Also I didn't wanted to change API. Not that I believe that there are many 3rd
party packages for Info and Help modes, and that people actually customize
those, but anyway. Wrappers would be a new API, which all require at least some
documentation etc.




reply via email to

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