[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Getting last-command with arguments
From: |
Stefan Monnier |
Subject: |
Re: Getting last-command with arguments |
Date: |
Fri, 13 Sep 2013 08:42:37 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
>> 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.
Stefan