Commit bc165bce authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(make-autoload): Recognize the new `define-minor-mode'.

(define-minor-mode): Specify `doc-string-elt'.
parent 29cc3b84
1999-11-23 Stefan Monnier <monnier@cs.yale.edu>
* emacs-lisp/autoload.el (make-autoload): Recognize the new
`define-minor-mode'.
(define-minor-mode): Specify `doc-string-elt'.
* emacs-lisp/easy-mmode.el: Changed maintainer.
(easy-mmode-define-toggle): New BODY arg; Never append `-mode';
Use defcustom for the hooks; Improve the auto-generated docstrings.
......
......@@ -63,19 +63,19 @@ that text will be copied verbatim to `generated-autoload-file'.")
(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', `define-generic-mode', `defmacro', `defcustom'
or `easy-mmode-define-minor-mode'."
`define-derived-mode', `define-generic-mode', `defmacro', `defcustom',
`define-minor-mode' or `easy-mmode-define-minor-mode'."
(let ((car (car-safe form)))
(if (memq car '(defun define-skeleton defmacro define-derived-mode
define-generic-mode easy-mmode-define-minor-mode
defun*))
define-minor-mode defun*))
(let ((macrop (eq car 'defmacro))
name doc)
(setq form (cdr form)
name (car form)
;; Ignore the arguments.
form (cdr (cond
((memq car '(define-skeleton
((memq car '(define-skeleton define-minor-mode
easy-mmode-define-minor-mode)) form)
((eq car 'define-derived-mode) (cdr (cdr form)))
((eq car 'define-generic-mode)
......@@ -90,6 +90,7 @@ or `easy-mmode-define-minor-mode'."
(or (eq car 'define-skeleton) (eq car 'define-derived-mode)
(eq car 'define-generic-mode)
(eq car 'easy-mmode-define-minor-mode)
(eq car '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,
......@@ -136,6 +137,7 @@ or `easy-mmode-define-minor-mode'."
(put 'define-skeleton 'doc-string-elt 3)
(put 'define-derived-mode 'doc-string-elt 3)
(put 'easy-mmode-define-minor-mode 'doc-string-elt 3)
(put 'define-minor-mode 'doc-string-elt 3)
(put 'define-generic-mode 'doc-string-elt 3)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment