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

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

Re: Delete multiple repositories programmatically from elisp by supplyin


From: Robert Pluim
Subject: Re: Delete multiple repositories programmatically from elisp by supplying `y' as the answer to an interactively called function.
Date: Wed, 08 Dec 2021 10:41:58 +0100

>>>>> On Tue, 07 Dec 2021 20:14:12 +0100, Emanuel Berg via Users list for the 
>>>>> GNU Emacs text editor <help-gnu-emacs@gnu.org> said:

    Emanuel> Robert Pluim wrote:
    >> That function takes a 'force' argument, so if you manage to
    >> supply any prefix arg at all it will delete all the repos
    >> without prompting. One way to do that is by using
    >> `current-prefix-arg':
    >> 
    >> (let ((current-prefix-arg '(4)))
    >> (call-interactively #'straight-remove-unused-repos))

    Emanuel> Why does it have to be used interactively?

    Emanuel> That's often not a good sign ...

In this case it doesnʼt. Other commands inspect the value of
current-prefix-arg, not just the value produced by their `interactive'
spec, and then you have to use this particular hammer.

Robert
-- 



reply via email to

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