[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Getting last-command with arguments
From: |
Xue Fuqiao |
Subject: |
Re: Getting last-command with arguments |
Date: |
Sat, 14 Sep 2013 08:12:50 +0800 |
On Fri, Sep 13, 2013 at 9:58 PM, Nicolas Richard
<theonewiththeevillook@yahoo.fr> wrote:
> last-prefix-arg sounds like a good candidate from its docstring, but I
> don't understand how it works:
>
> (defun yf/foo (arg)
> (interactive "i")
> (message "Last: %s : %s\nThis: %s : %s"
> last-command last-prefix-arg
> this-command current-prefix-arg))
> (local-set-key (kbd "<f5>") #'yf/foo)
>
> Hitting RET RET C-u <f5> in a buffer shows me:
> Last: newline : (4)
> This: yf/foo : (4)
>
> I expected
>
> Last: newline : nil
> This: yf/foo : (4)
I just tried it with r114269 and it worked as you expected.
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/