GNU bug report logs - #17446
24.4.50; What is the situation around `called-interactively-p'?

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Fri, 9 May 2014 12:31:01 UTC

Severity: wishlist

Found in version 24.4.50

Fixed in version 25.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 17446 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: bug#17446: 24.4.50; What is the situation around `called-interactively-p'?
Date: Sat, 10 May 2014 10:06:36 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> (apply #'funcall-interactively (car newcmd) (cdr newcmd))
>
> No, `newcmd' is an expression, so (cdr newcommand) contains arguments
> that need to be evaluated.  In some/many cases this evaluation is
> trivial (the args are self-quoting, like nil or integers), but sometimes
> the args can be things like (region-beginning).

Hmm, not sure of this, at least for `repeat-complex-command' something
like (region-beginning) is already evaluated and recorded as an integer
no ?
Oh! ok I see, something like M-: (region-beginning)
will be recorded as something like 

(pp-eval-expression (quote (region-beginning)))

>> >    (defun funcall-interactively (fun &rest args)
> [sample hack to define funcall-interactively in terms of call-interactively]
>> This won't work IMO, why fun would be a cons or a byte-code-function ?
>
> These are the only interesting cases.  The other cases (subrp and
> symbolp, AFAICT) are trivial.

I still don't understand how this would be able to call interactively
something like:

(count-words-region 234 567 nil)

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 





This bug report was last modified 8 years and 123 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.