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 | |
| 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')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/data.c | 27 |
2 files changed, 24 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index bfdf9abb5d2..49613185ae4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,6 +1,11 @@ | |||
| 1 | 2007-07-25 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2007-07-25 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * data.c (Finteractive_form): Use a `interactive-form' property if | 3 | * eval.c (Fcommandp): Pay attention to the `interactive-form' property. |
| 4 | |||
| 5 | * data.c (Finteractive_form): Check for the presence of an | ||
| 6 | `interactive-form' symbol property more thoroughly. | ||
| 7 | |||
| 8 | * data.c (Finteractive_form): Use an `interactive-form' property if | ||
| 4 | present, analogous to the function-documentation property. | 9 | present, analogous to the function-documentation property. |
| 5 | 10 | ||
| 6 | 2007-07-22 Nick Roberts <nickrob@snap.net.nz> | 11 | 2007-07-22 Nick Roberts <nickrob@snap.net.nz> |
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)); |