[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 964ba0f: Document 'funcall-interactively'
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-25 964ba0f: Document 'funcall-interactively' |
Date: |
Sat, 16 Jan 2016 14:55:14 +0000 |
branch: emacs-25
commit 964ba0f5261b2de1c5979cef8727cd1663b4438b
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Document 'funcall-interactively'
* doc/lispref/commands.texi (Interactive Call): Document
'funcall-interactively'.
* doc/lispref/functions.texi (Calling Functions): Mention
'funcall-interactively' and provide a cross-reference.
---
doc/lispref/commands.texi | 8 ++++++++
doc/lispref/functions.texi | 4 ++++
etc/NEWS | 1 +
3 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index dee43ce..9c1df89 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -691,6 +691,14 @@ default is the return value of
@code{this-command-keys-vector}.
@xref{Definition of this-command-keys-vector}.
@end defun
address@hidden 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
address@hidden inside @var{function} will return
address@hidden If @var{function} is not a command, it is called without
+signaling an error.
address@hidden defun
+
@defun command-execute command &optional record-flag keys special
@cindex keyboard macro execution
This function executes @var{command}. The argument @var{command} must
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index d3d0a42..1e8e754 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -754,6 +754,10 @@ they make sense only when given the unevaluated argument
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)
diff --git a/etc/NEWS b/etc/NEWS
index 01a8490..6735718 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1467,6 +1467,7 @@ MS-Windows doesn't support UTF-8 as codeset in its
locales.
+++
** 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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 964ba0f: Document 'funcall-interactively',
Eli Zaretskii <=