aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/eval.c b/src/eval.c
index fc7a7f426bc..b10842b62c8 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1761,7 +1761,7 @@ error (m, a1, a2, a3)
1761 abort (); 1761 abort ();
1762} 1762}
1763 1763
1764DEFUN ("commandp", Fcommandp, Scommandp, 1, 1, 0, 1764DEFUN ("commandp", Fcommandp, Scommandp, 1, 2, 0,
1765 doc: /* Non-nil if FUNCTION makes provisions for interactive calling. 1765 doc: /* Non-nil if FUNCTION makes provisions for interactive calling.
1766This means it contains a description for how to read arguments to give it. 1766This means it contains a description for how to read arguments to give it.
1767The value is nil for an invalid function or a symbol with no function 1767The value is nil for an invalid function or a symbol with no function
@@ -1772,9 +1772,12 @@ as keyboard macros), lambda-expressions that contain a top-level call
1772to `interactive', autoload definitions made by `autoload' with non-nil 1772to `interactive', autoload definitions made by `autoload' with non-nil
1773fourth argument, and some of the built-in functions of Lisp. 1773fourth argument, and some of the built-in functions of Lisp.
1774 1774
1775Also, a symbol satisfies `commandp' if its function definition does so. */) 1775Also, a symbol satisfies `commandp' if its function definition does so.
1776 (function) 1776
1777 Lisp_Object function; 1777If the optional argument FOR-CALL-INTERACTIVELY is non-nil,
1778then strins and vectors are not accepted. */)
1779 (function, for_call_interactively)
1780 Lisp_Object function, for_call_interactively;
1778{ 1781{
1779 register Lisp_Object fun; 1782 register Lisp_Object fun;
1780 register Lisp_Object funcar; 1783 register Lisp_Object funcar;
@@ -1803,7 +1806,7 @@ Also, a symbol satisfies `commandp' if its function definition does so. */)
1803 ? Qt : Qnil); 1806 ? Qt : Qnil);
1804 1807
1805 /* Strings and vectors are keyboard macros. */ 1808 /* Strings and vectors are keyboard macros. */
1806 if (STRINGP (fun) || VECTORP (fun)) 1809 if (NILP (for_call_interactively) && (STRINGP (fun) || VECTORP (fun)))
1807 return Qt; 1810 return Qt;
1808 1811
1809 /* Lists may represent commands. */ 1812 /* Lists may represent commands. */