Issue556

classification
Title We need `called-interactively-p'
Type defect Module core code 21.4, core code 21.5
Severity inconvenience Platform N/A
Keywords Nosy List stephen
explanation
process
These controls should only be changed by committers and tracker administrators.
Status assigned   Reason
Superseder  
Priority normal   Assigned To

Created on 2009-08-18.08:13:54 by stephen, last changed 2009-08-19.06:39:40 by stephen.

Files
File name Uploaded Type Edit Remove
advice.patch stephen, 2009-08-19.06:39:40 application/octet-stream
Messages
msg1830 [hidden] ([hidden]) Date: 2009-08-19.06:39:40
'advice.patch' has been submitted to XEmacs Patches.  This only fixes
advice.el, however.

To resolve this issue, I think we need (1) a patch to core to properly
implement `called-interactively-p' and (2) a compatibility library which
can be required to define the function in XEmacsen that don't have it.
msg1822 [hidden] ([hidden]) Date: 2009-08-18.08:13:54
We have `interactive-p' which is defined more or less as

    (and (not (noninteractive)) (called-interactively-p) (not executing-kbd-macro))

where "called-interactively-p" is implemented internally to `interactive-p', and is 
somewhat fiddly (see src/callint.c).

The problem is that `interactive-p' is often used by "wrappers" like advice to 
decide whether to call some other function with `call-interactively' or 
`funcall'/`apply'.  Usually, maybe even always, we want `call-interactively' used 
when executing a kbd macro.

Recipe from xemacs -q:
Evaluate:
(defadvice self-insert-command (around self-insert-ad activate) 
    "test." 
  ad-do-it) 
Define a keyboard macro:
C-x ( aaaa C-x ) 
and execute it: 
C-x e
==> Wrong type argument: natnump, nil 

Thanks to Michael Kifer for report and recipe.
History
Date User Action Args
2009-08-19 06:39:40stephensetfiles: + advice.patch
messages: + msg1830
2009-08-18 08:13:54stephencreate