summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-05-12 01:14:36 +0000
committerRichard M. Stallman <rms@gnu.org>1997-05-12 01:14:36 +0000
commitceaa369594356e7aae5e1539d9018092987e154c (patch)
treeb6df0bafe53c33b14b0d57bc0f26fdc1afffc9af /lisp/emacs-lisp
parenta05e04088e507f7f332071c7b4a4f3afc6d9bdaf (diff)
downloademacs-ceaa369594356e7aae5e1539d9018092987e154c.tar.gz
emacs-ceaa369594356e7aae5e1539d9018092987e154c.tar.bz2
emacs-ceaa369594356e7aae5e1539d9018092987e154c.zip
(defcustom): Add doc-string-elt property.
(make-autoload): Convert defcustom into defvar.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/autoload.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index bf5b5fffc42..5505b71b631 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -32,8 +32,8 @@
;;; Code:
(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, define-skeleton or defmacro."
+ "Turn FORM into an autoload or defvar for source file FILE.
+Returns nil if FORM is not a defun, define-skeleton, defmacro or defcustom."
(let ((car (car-safe form)))
(if (memq car '(defun define-skeleton defmacro))
(let ((macrop (eq car 'defmacro))
@@ -52,7 +52,12 @@ Returns nil if FORM is not a defun, define-skeleton or defmacro."
(or (eq car 'define-skeleton)
(eq (car-safe (car form)) 'interactive))
(if macrop (list 'quote 'macro) nil)))
- nil)))
+ (if (eq car 'defcustom)
+ (let ((varname (car-safe (cdr-safe form)))
+ (init (car-safe (cdr-safe (cdr-safe form))))
+ (doc (car-safe (cdr-safe (cdr-safe (cdr-safe form))))))
+ (list 'defvar varname init doc))
+ nil))))
(put 'define-skeleton 'doc-string-elt 3)
@@ -98,6 +103,7 @@ the section of autoloads for a file.")
(put 'autoload 'doc-string-elt 3)
(put 'defun 'doc-string-elt 3)
(put 'defvar 'doc-string-elt 3)
+(put 'defcustom 'doc-string-elt 3)
(put 'defconst 'doc-string-elt 3)
(put 'defmacro 'doc-string-elt 3)