bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#45333: complex command history should not save optional nil paramete


From: Michael Heerdegen
Subject: bug#45333: complex command history should not save optional nil parameters
Date: Tue, 05 Jul 2022 16:16:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Ah; thanks.  Yes, we land things like
>
> (replace-string "foo" "bar" nil nil nil nil nil)
>
> in `command-history' -- where all those nils are optional.  We could
> pretty easily filter those out by looking at the signature of the
> function and peeling off trailing nils, I think?  Would there be any
> disadvantages to doing so?

Note that there are only such `nil`s when the evaluation of the
interactive spec returned them.  It's somewhat consistent if the command
history includes the argument list exactly as returned by `interactive'.

The more general problem is to provide interactive forms that work
nicely with `repeat-complex-command' - something programmers are often
not aware of when writing commands.

Anyway, trying of prettify away those `nil`s seems like overkill to me.
In theory even an optional `nil' can be significant.

Michael.





reply via email to

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