emacs-devel
[Top][All Lists]
Advanced

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

Re: Info-mode patch


From: Juri Linkov
Subject: Re: Info-mode patch
Date: Sun, 02 Jul 2023 20:53:51 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>>>> Another advantage of wrapper commands is that you can implement what
>>>> Manuel asked you to do to make key sequences for another window repeatable.
>>>> This is possible only when you have separate wrapper commands like
>>>> Info-directory-other-window and a separate keymap with them like
>>>> Info-other-window-map.
>>>
>>> What exactly would not make my patch work with repeating commands?
>>
>> You can't add repeat symbols on existing Info commands used in Info buffers,
>> only wrapper commands with a prefix key should be repeatable.
>
> I am not sure what that means, but I have tried repeat mode now with
> my patch and it works out of the box. Both from an info buffer, and from other
> buffer. It is kind-a cool, was not familiar with repeat mode before.

But it's needed only for Info-other-window commands,
not for Info-same-window commands.

> Can I get *some* help? When rewriting Info-mode-map definition, so I can use
> :repeat keword to skip typing bunch of "put" statements, I couldn't add 
> tool-bar
> shortcuts in the map definitions. How do I use those with kbd syntax?
>
> (defvar-keymap Info-mode-map
>   ( ... )
>   ;;"<tool-bar> <C-Back in history>"    'Info-history-back-menu
>   ;;"<tool-bar> <C-Forward in history>" 'Info-history-forward-menu
>   )
>
> (define-key Info-mode-map [tool-bar C-Back\ in\ history]    
> 'Info-history-back-menu)
> (define-key Info-mode-map [tool-bar C-Forward\ in\ history] 
> 'Info-history-forward-menu)
>
> I would like to not have to use those two define-key statements after the
> definition.

It seems you found a bug in 'key-valid-p'!
And indeed it returns nil:

  (key-valid-p "<tool-bar> <C-Back in history>")

Whereas

  (kbd "<tool-bar> <C-Back in history>")

correctly returns [tool-bar C-Back\ in\ history].

This is a clear bug in emacs-29.

> Is there some way to tell interactive  where all propts will be placed, 
> without
> parsing interactive form and checking strings for interactive codes or 
> something
> similar awkward?

Yes, there is such way by using the variable 
'minibuffer-follows-selected-frame'.



reply via email to

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