* doc/lispref/commands.texi (Interactive Call): Document
'funcall-interactively'.
* doc/lispref/functions.texi (Calling Functions): Mention
'funcall-interactively' and provide a cross-reference.
@xref{Definition of this-command-keys-vector}.
@end defun
+@defun funcall-interactively function &rest arguments
+This function works like @code{funcall} (@pxref{Calling Functions}),
+but it makes the call look like an interactive invocation: a call to
+@code{called-interactively-p} inside @var{function} will return
+@code{t}. If @var{function} is not a command, it is called without
+signaling an error.
+@end defun
+
@defun command-execute command &optional record-flag keys special
@cindex keyboard macro execution
This function executes @var{command}. The argument @var{command} must
expressions. @code{funcall} cannot provide these because, as we saw
above, it never knows them in the first place.
+If you need to use @code{funcall} to call a command and make it behave
+as if invoked interactively, use @code{funcall-interactively}
+(@pxref{Interactive Call}).
+
@example
@group
(setq f 'list)
+++
** New function `alist-get', which is also a valid place (aka lvalue).
++++
** New function `funcall-interactively', which works like `funcall'
but makes `called-interactively-p' treat the function as (you guessed it)
called interactively.