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: novim
Subject: bug#45333: complex command history should not save optional nil parameters
Date: Sun, 20 Dec 2020 09:01:27 +0000

I  often use complex command history and I often copy commands from it to my notes. For some commands the _expression_ saved in this history is more complex than necessary.

Here's an example with a simple command:

I do a query replace then go to complex command history which shows:

  (query-replace-regexp "a"  "b" nil nil nil nil nil)

If I save this command then I delete the nils, because they are unnecessary there and make the _expression_ noisy in my notes, so I delete them manually:

  (query-replace-regexp "a"  "b")

This is the same command, since the rest of the params are optional:

  (query-replace FROM-STRING TO-STRING &optional DELIMITED START END BACKWARD REGION-NONCONTIGUOUS-P)

When commands are saved in the complex history they should be saved in a format which skips the rest of the arguments if they are optional and nil.


reply via email to

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