It's me FKtPp ;) writes:
"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
> It's me FKtPp ;) writes:
> > Dear Developers,
> > Here's my patch for the #'cd problem.. Wish it be helpful~
> > + (let ((cdpath-current (getenv "CDPATH")))
> > + (interactive
> Have you tested this?
Ah.. Sorry, it seemed that I break its interactive-ablity
completely. But I do tested the code, say in eshell-mode..
How were you supposed to know? It wasn't documented. I can fix
diff -r e9ccbc62f7e7 src/ChangeLog
--- a/src/ChangeLog Sun Jun 14 16:08:22 2009 +0100
+++ b/src/ChangeLog Sat Jun 20 03:56:56 2009 +0900
＠＠ -0,0 +1,5 ＠＠
+2009-06-20 Stephen Turnbull <stephen(a)xemacs.org>
+ * callint.c (Finteractive): Document that (interactive) must
+ appear at the "top level" of a function definition to be effective.
diff -r e9ccbc62f7e7 src/callint.c
--- a/src/callint.c Sun Jun 14 16:08:22 2009 +0100
+++ b/src/callint.c Sat Jun 20 03:56:56 2009 +0900
＠＠ -86,6 +86,9 ＠＠
The "call" to `interactive' is actually a declaration rather than a
it tells `call-interactively' how to read arguments
to pass to the function.
+The interactive form must appear at the top level of the function body. If
+ it is wrapped in a `let' or `progn' or similar, Lisp will not even realize
+ the function is an interactive command!
When actually called, `interactive' just returns nil.
The argument of `interactive' is usually a string containing a code letter
XEmacs-Patches mailing list