diff options
author | Karl Heuer <kwzh@gnu.org> | 1995-07-07 19:20:09 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1995-07-07 19:20:09 +0000 |
commit | 76d53f747bff760eb21c1384fb05a8c4027c13de (patch) | |
tree | 1546d1f2b4ceab968ea28fb7438ea3bc3834f143 /lisp/emacs-lisp | |
parent | 7d4f635a7a4f9f0fcd9639f80e927fd1515e4d00 (diff) | |
download | emacs-76d53f747bff760eb21c1384fb05a8c4027c13de.tar.gz |
(make-autoload): Generate `(autoload ...)' form for
`(define-skeleton ...)'
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/autoload.el | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index e2d7e156d8c..19b524ebb4f 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -32,24 +32,29 @@ (defun make-autoload (form file) "Turn FORM, a defun or defmacro, into an autoload for source file FILE. -Returns nil if FORM is not a defun or defmacro." +Returns nil if FORM is not a defun, define-skeleton or defmacro." (let ((car (car-safe form))) - (if (memq car '(defun defmacro)) + (if (memq car '(defun define-skeleton defmacro)) (let ((macrop (eq car 'defmacro)) name doc) - (setq form (cdr form)) - (setq name (car form)) - ;; Ignore the arguments. - (setq form (cdr (cdr form))) - (setq doc (car form)) + (setq form (cdr form) + name (car form) + ;; Ignore the arguments. + form (cdr (if (eq car 'define-skeleton) + form + (cdr form))) + doc (car form)) (if (stringp doc) (setq form (cdr form)) (setq doc nil)) (list 'autoload (list 'quote name) file doc - (eq (car-safe (car form)) 'interactive) + (or (eq car 'define-skeleton) + (eq (car-safe (car form)) 'interactive)) (if macrop (list 'quote 'macro) nil))) nil))) +(put 'define-skeleton 'doc-string-elt 3) + (defconst generate-autoload-cookie ";;;###autoload" "Magic comment indicating the following form should be autoloaded. Used by \\[update-file-autoloads]. This string should be |