diff options
| author | Richard M. Stallman | 2002-04-28 22:06:38 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-04-28 22:06:38 +0000 |
| commit | e72706be3813445cecba06db398f1a48aa8cf372 (patch) | |
| tree | 9098ceba08b9c6a638f383c5cdce1288f8ec47a0 /src/eval.c | |
| parent | 2a4d03b8614bd7910225ce7ecb526e3f0a68fc4a (diff) | |
| download | emacs-e72706be3813445cecba06db398f1a48aa8cf372.tar.gz emacs-e72706be3813445cecba06db398f1a48aa8cf372.zip | |
(Fcommandp): New arg for_call_interactively.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 13 |
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 | ||
| 1764 | DEFUN ("commandp", Fcommandp, Scommandp, 1, 1, 0, | 1764 | DEFUN ("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. |
| 1766 | This means it contains a description for how to read arguments to give it. | 1766 | This means it contains a description for how to read arguments to give it. |
| 1767 | The value is nil for an invalid function or a symbol with no function | 1767 | The 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 | |||
| 1772 | to `interactive', autoload definitions made by `autoload' with non-nil | 1772 | to `interactive', autoload definitions made by `autoload' with non-nil |
| 1773 | fourth argument, and some of the built-in functions of Lisp. | 1773 | fourth argument, and some of the built-in functions of Lisp. |
| 1774 | 1774 | ||
| 1775 | Also, a symbol satisfies `commandp' if its function definition does so. */) | 1775 | Also, a symbol satisfies `commandp' if its function definition does so. |
| 1776 | (function) | 1776 | |
| 1777 | Lisp_Object function; | 1777 | If the optional argument FOR-CALL-INTERACTIVELY is non-nil, |
| 1778 | then 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. */ |