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: Wed, 05 Jul 2023 16:25:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Juri Linkov <juri@linkov.net> writes:

>> Incosistent with what?
>
> Incosistent with 'C-x M-:' (repeat-complex-command) that is used
> to repeat a previous command with its arguments.  With this
> additional 'declare' form:
>
>   (defun Info-menu-other-window (window &rest args)
>     (declare (interactive-args (window (info-window))))
>     (interactive
>      (let ((window (info-window)))
>        (with-current-buffer (window-buffer window)
>          (cons window (eval (cadr (interactive-form 'Info-menu)))))))
>     (with-selected-window window
>       (apply #'Info-menu args)))
>
> 'C-x M-:' will show the arguments of the previous command as
>
>   (Info-menu-other-window (info-window) args...)
>
> that you can safely repeat by just typing RET.

I see. I understand what you are after to, but I think there are several
problems with what you are doing there in other areas then what you gain
with repeat-complex-command.

Also, as a remark, I extended the "window" command in just certain cases
as discussed earlier, because I perecieved Zaretski that he didn't like
using a global var as I did initially in Info-jump in some mail. But you
can certainly do without that window argument. You don't need to use
plist hack I used. So you can totally skip those "window" gymnastics
and just use &rest args.

Also isn't repeat-complex-command a command too? If you are after the
consistency, then you should perhaps have
repeat-complex-command-other-window too? :).



reply via email to

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