changeset 22247:7db7ffb27feb

(make-autoload): Add support for define-derived-mode. Update the doc-string accordingly.
author Richard M. Stallman <rms@gnu.org>
date Tue, 26 May 1998 05:14:52 +0000
parents afacb0a7e251
children 70d9ba94ce39
files lisp/emacs-lisp/autoload.el
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/autoload.el	Mon May 25 22:40:45 1998 +0000
+++ b/lisp/emacs-lisp/autoload.el	Tue May 26 05:14:52 1998 +0000
@@ -61,23 +61,25 @@
 
 (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, defmacro or defcustom."
+Returns nil if FORM is not a defun, define-skeleton, define-derived-mode, 
+defmacro or defcustom."
   (let ((car (car-safe form)))
-    (if (memq car '(defun define-skeleton defmacro))
+    (if (memq car '(defun define-skeleton defmacro define-derived-mode))
 	(let ((macrop (eq car 'defmacro))
 	      name doc)
 	  (setq form (cdr form)
 		name (car form)
 		;; Ignore the arguments.
-		form (cdr (if (eq car 'define-skeleton)
-			      form
-			    (cdr form)))
+		form (cdr (cond 
+			   ((eq car 'define-skeleton) form)
+			   ((eq car 'define-derived-mode) (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
-		(or (eq car 'define-skeleton)
+		(or (eq car 'define-skeleton) (eq car 'define-derived-mode)
 		    (eq (car-safe (car form)) 'interactive))
 		(if macrop (list 'quote 'macro) nil)))
       ;; Convert defcustom to a simpler (and less space-consuming) defvar,
@@ -123,6 +125,8 @@
 (put 'defcustom 'doc-string-elt 3)
 (put 'defconst 'doc-string-elt 3)
 (put 'defmacro 'doc-string-elt 3)
+(put 'define-derived-mode 'doc-string-elt 4)
+
 
 (defun autoload-trim-file-name (file)
   ;; Returns a relative pathname of FILE