[Top][All Lists]

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

Re: Getting last-command with arguments

From: Suvayu Ali
Subject: Re: Getting last-command with arguments
Date: Fri, 13 Sep 2013 15:33:44 +0200
User-agent: Mutt/1.5.21 (2012-12-30)

On Fri, Sep 13, 2013 at 08:42:37AM -0400, Stefan Monnier wrote:
> >> I am conditionally repeating the last command from inside an elisp
> >> function.  So I look at `last-command' and decide.  But now I want to
> >> see the original arguments: say the command was, M-2 M-x my-command RET,
> >> then I want to know 2 was passed to `my-command'.  I am not sure how I
> >> can do that.
> > The variable current-prefix-arg has that information.
> Since we're talking about my-command rather than some random command,
> you can simply change my-command to stash its argument in, say,
> my-command--last-args.

Ah!  Did not think about that.  Thank you.


Open source is the future. It sets us free.

reply via email to

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