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

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

bug#17446: 24.4.50; What is the situation around `called-interactively-p


From: Michael Heerdegen
Subject: bug#17446: 24.4.50; What is the situation around `called-interactively-p'?
Date: Sat, 17 May 2014 20:01:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.90 (gnu/linux)

Hi,

my last question was: should `repeat-complex-command' set
`this-command'?  See my example.  If the answer is "yes" - shall I
create a separate bug report?


Thanks,

Michael.



> Example:
>
> (defvar the-string nil)
>
> (defun test (string)
>   (interactive (list (if (eq this-command last-command)
>                          the-string
>                        (setq the-string (read-string "Enter string: ")))))
>   (message (concat "You "
>                    (if (eq this-command last-command) "had" "have")
>                    " entered "
>                    the-string)))
>
> (global-set-key [f12] #'test)
>
> If you repeat `test' via repeat-complex-command and hit f12 after that,
> it doesn't behave as expected (i.e., message "You had entered ...").
> Should it?





reply via email to

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