diff options
author | Richard M. Stallman <rms@gnu.org> | 2002-12-07 21:31:58 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2002-12-07 21:31:58 +0000 |
commit | 4a3c5b3af93caba2d1e1a945e6784436e4246cd3 (patch) | |
tree | 9231a2796c0f58f5de212afc53dd01bcaa6e82ba /lisp/emacs-lisp/autoload.el | |
parent | e0dfc625b57646bdc9c4cc5d51df0f6551647ef6 (diff) | |
download | emacs-4a3c5b3af93caba2d1e1a945e6784436e4246cd3.tar.gz emacs-4a3c5b3af93caba2d1e1a945e6784436e4246cd3.tar.bz2 emacs-4a3c5b3af93caba2d1e1a945e6784436e4246cd3.zip |
(autoload-print-form-outbuf): New variable.
(autoload-print-form): Use autoload-print-form-outbuf.
(generate-file-autoloads): Bind autoload-print-form-outbuf.
Diffstat (limited to 'lisp/emacs-lisp/autoload.el')
-rw-r--r-- | lisp/emacs-lisp/autoload.el | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 2dd909681ca..497103c5248 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -164,16 +164,20 @@ markers before we call `read'." (goto-char (point-min)) (read (current-buffer)))))) -;; !! Requires OUTBUF to be bound !! +(defvar autoload-print-form-outbuf) + (defun autoload-print-form (form) - "Print FORM such that make-docfile will find the docstrings." + "Print FORM such that `make-docfile' will find the docstrings. +The variable `autoload-print-form-outbuf' specifies the buffer to +put the output in." (cond ;; If the form is a sequence, recurse. ((eq (car form) 'progn) (mapcar 'autoload-print-form (cdr form))) ;; Symbols at the toplevel are meaningless. ((symbolp form) nil) (t - (let ((doc-string-elt (get (car-safe form) 'doc-string-elt))) + (let ((doc-string-elt (get (car-safe form) 'doc-string-elt)) + (outbuf autoload-print-form-outbuf)) (if (and doc-string-elt (stringp (nth doc-string-elt form))) ;; We need to hack the printing because the ;; doc-string must be printed specially for @@ -317,7 +321,8 @@ are used." (setq autoloads-done (cons (nth 1 form) autoloads-done)) (setq autoload form)) - (autoload-print-form autoload)) + (let ((autoload-print-form-outbuf outbuf)) + (autoload-print-form autoload))) ;; Copy the rest of the line to the output. (princ (buffer-substring |