autoload.el suggestion

Jari Aalto jari.aalto at poboxes.com
Thu Apr 1 04:58:50 EST 2004


* Thu 2004-03-25 Zajcev Evgeny <zevlg <AT> yandex.ru> gmane.emacs.xemacs.beta
| Hello XEmacs developers!
| 
| Recently i was faced to problem that autoload generation is a little
| stricted.  For example if i have Emacs lisp macro which actually
| produces proper defun, there is no way to make it autoloadable, or it
| is possible but with huge overhead.  Here is example:
| 
|   (defmacro define-test-command funame args docstr inter &rest forms
|     `(defun ,funame ,args
|        ,docstr
|        ,inter
|        (let ((testvar1 ...)
|              (testvar2 ..))
|         ; Here is some test command specific processing
|         )
|        (progn , at body)))
| 
|  This macro used to simplify some test commands definition, in such
| commands some test specific operations performed, so it is pretty
| handy to have such `define-test-command' macro, so test commands
| definitions looks like:
| 
|   (define-test-command test-command (args)
|      "Docstring."
|      (interactive ..)
|      forms)
| 
| But when marking such form with ";;;###autoload" does not ignores
| arguments as it done for `defun' and others.

You could do it like this: Not quite automatic, but works.

;;;###autoload (autoload 'test-command "test" "" t)
(define-test-command test-command (args)
  "Docstring."
  (interactive ..)
   forms)

Jari

-- 
http://tiny-tools.sourceforge.net/
Swatch @time   http://www.mir.com.my/iTime/itime.htm
               http://www.ryanthiessen.com/swatch/resources.htm
Use Licenses!  http://www.linuxjournal.com/article.php?sid=6225
Which Licence? http://www.linuxjournal.com/article.php?sid=4825
OSI Licences   http://www.opensource.org/licenses/




More information about the XEmacs-Beta mailing list