aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2004-11-01 07:47:08 +0000
committerRichard M. Stallman2004-11-01 07:47:08 +0000
commit9d0d10708496729d062ae04fe2f191c16dc831b3 (patch)
treecb7fcb58007a6539997d9951c61e6a032d76d2a0
parentca5f43fa079964246af32562774a6dbd462622a8 (diff)
downloademacs-9d0d10708496729d062ae04fe2f191c16dc831b3.tar.gz
emacs-9d0d10708496729d062ae04fe2f191c16dc831b3.zip
(Interactive Call): Add called-interactively-p.
-rw-r--r--lispref/commands.texi11
1 files changed, 10 insertions, 1 deletions
diff --git a/lispref/commands.texi b/lispref/commands.texi
index f1f94e11838..3c9612e5186 100644
--- a/lispref/commands.texi
+++ b/lispref/commands.texi
@@ -617,7 +617,7 @@ This function returns @code{t} if the containing function (the one
617whose code includes the call to @code{interactive-p}) was called in 617whose code includes the call to @code{interactive-p}) was called in
618direct response to user input. This means that it was called with the 618direct response to user input. This means that it was called with the
619function @code{call-interactively}, and that a keyboard macro is 619function @code{call-interactively}, and that a keyboard macro is
620not running. 620not running, and that Emacs is not running in batch mode.
621 621
622If the containing function was called by Lisp evaluation (or with 622If the containing function was called by Lisp evaluation (or with
623@code{apply} or @code{funcall}), then it was not called interactively. 623@code{apply} or @code{funcall}), then it was not called interactively.
@@ -679,6 +679,15 @@ Defined in this way, the function does display the message when called
679from a keyboard macro. We use @code{"p"} because the numeric prefix 679from a keyboard macro. We use @code{"p"} because the numeric prefix
680argument is never @code{nil}. 680argument is never @code{nil}.
681 681
682@defun called-interactively-p
683This function returns @code{t} when the calling function was called
684using @code{call-interactively}.
685
686When possible, instead of using this function, you should use the
687method in the example above; that method makes it possible for a
688caller to ``pretend'' that the function was called interactively.
689@end defun
690
682@node Command Loop Info 691@node Command Loop Info
683@comment node-name, next, previous, up 692@comment node-name, next, previous, up
684@section Information from the Command Loop 693@section Information from the Command Loop