>> Try (debug (sexp def-form def-form def-form form def-form [&optional >> stringp]))
> This does indeed work. (The brackets are not necessary, are they?) I find it good practice to always use the brackets, but you're right, it's not necessary. > The node "Specification List" in the lisp manual says that def-form > can only be used after &define, however. And when I do that, things > seem to break. Experience proves the doc is wrong. What I found instead is that `form' can't be used after &define. I think the bug is not that things don't work with `&define' but that edebug should burp on a spec that uses both &define and `form' (or `body' for that matter). >> Another option is to evaluate those arguments before you plug them in the >> body of your major mode function, so they're only evaluated once, when >> the major mode is defined, thus reproducing the "pre-macro" behavior. > Considering backward compatibility, that's probably the right thing to do. It also moves more work to macro-expansion time which is good. But beware, it can also break backward compatibility, because now evaluation can take place at byte-compile time. OTOH it's closer to what I meant by "turn it into a macro" (in the comment that prompted you to look into this whole thing). Ideally define-generic-mode should (just like define-derived-mode does) generate stand-alone code which does not require generic.el. Stefan _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel