changeset 22371:f3cf0507c362

*** empty log message ***
author Dan Nicolaescu <done@ece.arizona.edu>
date Sat, 06 Jun 1998 20:22:47 +0000
parents 1f0dc0251be3
children ffea5f2dd01b
files lisp/emacs-lisp/autoload.el
diffstat 1 files changed, 16 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/autoload.el	Sat Jun 06 20:20:13 1998 +0000
+++ b/lisp/emacs-lisp/autoload.el	Sat Jun 06 20:22:47 1998 +0000
@@ -61,25 +61,33 @@
 
 (defun make-autoload (form file)
   "Turn FORM into an autoload or defvar for source file FILE.
-Returns nil if FORM is not a `defun', `define-skeleton', `define-derived-mode',
-`defmacro' or `defcustom'."
+Returns nil if FORM is not a `defun', `define-skeleton',
+`define-derived-mode', `define-generic-mode', `defmacro', `defcustom'
+or `easy-mmode-define-minor-mode'."
   (let ((car (car-safe form)))
-    (if (memq car '(defun define-skeleton defmacro define-derived-mode))
+    (if (memq car '(defun define-skeleton defmacro define-derived-mode 
+		     define-generic-mode easy-mmode-define-minor-mode))
 	(let ((macrop (eq car 'defmacro))
 	      name doc)
 	  (setq form (cdr form)
 		name (car form)
 		;; Ignore the arguments.
 		form (cdr (cond 
-			   ((eq car 'define-skeleton) form)
+			   ((memq car '(define-skeleton 
+					 easy-mmode-define-minor-mode)) form)
 			   ((eq car 'define-derived-mode) (cdr (cdr form)))
+			   ((eq car 'define-generic-mode) 
+			    (cdr (cdr (cdr (cdr (cdr form))))))
 			   (t (cdr form))))
 		doc (car form))
 	  (if (stringp doc)
 	      (setq form (cdr form))
 	    (setq doc nil))
-	  (list 'autoload (list 'quote name) file doc
+	  ;; `define-generic-mode' quotes the name, so take care of that
+	  (list 'autoload (if (listp name) name (list 'quote name)) file doc
 		(or (eq car 'define-skeleton) (eq car 'define-derived-mode)
+		    (eq car 'define-generic-mode) 
+		    (eq car 'easy-mmode-define-minor-mode)
 		    (eq (car-safe (car form)) 'interactive))
 		(if macrop (list 'quote 'macro) nil)))
       ;; Convert defcustom to a simpler (and less space-consuming) defvar,
@@ -99,8 +107,6 @@
 				  ,(plist-get rest :require)))))
 	nil))))
 
-(put 'define-skeleton 'doc-string-elt 3)
-
 ;;; Forms which have doc-strings which should be printed specially.
 ;;; A doc-string-elt property of ELT says that (nth ELT FORM) is
 ;;; the doc-string in FORM.
@@ -125,7 +131,10 @@
 (put 'defcustom 'doc-string-elt 3)
 (put 'defconst 'doc-string-elt 3)
 (put 'defmacro 'doc-string-elt 3)
+(put 'define-skeleton 'doc-string-elt 3)
 (put 'define-derived-mode 'doc-string-elt 4)
+(put 'easy-mmode-define-minor-mode 'doc-string-elt 3)
+(put 'define-generic-mode 'doc-string-elt 3)
 
 
 (defun autoload-trim-file-name (file)