diff options
| author | Stefan Monnier | 2007-07-25 21:03:24 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-07-25 21:03:24 +0000 |
| commit | c4f46926ae2af8e668c3995eb4fec74bcc83b9ef (patch) | |
| tree | 070e865b48835fbb489093c01dbad1e95149fc09 /src/data.c | |
| parent | b7de6024f602f75a8c49ae36645845de07d00672 (diff) | |
| download | emacs-c4f46926ae2af8e668c3995eb4fec74bcc83b9ef.tar.gz emacs-c4f46926ae2af8e668c3995eb4fec74bcc83b9ef.zip | |
(Finteractive_form): Check for the presence of an
`interactive-form' symbol property more thoroughly.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/data.c b/src/data.c index f705aa559e8..15169d3d3f4 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -750,15 +750,24 @@ Value, if non-nil, is a list \(interactive SPEC). */) | |||
| 750 | (cmd) | 750 | (cmd) |
| 751 | Lisp_Object cmd; | 751 | Lisp_Object cmd; |
| 752 | { | 752 | { |
| 753 | Lisp_Object fun = indirect_function (cmd); | 753 | Lisp_Object fun = indirect_function (cmd); /* Check cycles. */ |
| 754 | Lisp_Object tmp; | 754 | |
| 755 | 755 | if (NILP (fun) || EQ (fun, Qunbound)) | |
| 756 | if (SYMBOLP (cmd) | 756 | return Qnil; |
| 757 | /* Use an `interactive-form' property if present, analogous to the | 757 | |
| 758 | function-documentation property. */ | 758 | /* Use an `interactive-form' property if present, analogous to the |
| 759 | && (tmp = Fget (cmd, intern ("interactive-form")), !NILP (tmp))) | 759 | function-documentation property. */ |
| 760 | return tmp; | 760 | fun = cmd; |
| 761 | else if (SUBRP (fun)) | 761 | while (SYMBOLP (fun)) |
| 762 | { | ||
| 763 | Lisp_Object tmp = Fget (fun, intern ("interactive-form")); | ||
| 764 | if (!NILP (tmp)) | ||
| 765 | return tmp; | ||
| 766 | else | ||
| 767 | fun = Fsymbol_function (fun); | ||
| 768 | } | ||
| 769 | |||
| 770 | if (SUBRP (fun)) | ||
| 762 | { | 771 | { |
| 763 | if (XSUBR (fun)->prompt) | 772 | if (XSUBR (fun)->prompt) |
| 764 | return list2 (Qinteractive, build_string (XSUBR (fun)->prompt)); | 773 | return list2 (Qinteractive, build_string (XSUBR (fun)->prompt)); |