aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp/autoload.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1998-05-09 07:02:50 +0000
committerRichard M. Stallman <[email protected]>1998-05-09 07:02:50 +0000
commit6b797f0613e6c2a898e8309e5e000cec9551ce10 (patch)
treecc32c9e16994bbfd26fcd4caa5322d414d25178d /lisp/emacs-lisp/autoload.el
parentee019c842f1d9fa06f7977e1bd1d9842e69088c7 (diff)
(generate-file-autoloads): Handle progn forms generated by
make-autoload: print just the first subform with print-escape-newlines.
Diffstat (limited to 'lisp/emacs-lisp/autoload.el')
-rw-r--r--lisp/emacs-lisp/autoload.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 1bce589cc8..9744709bc5 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -220,7 +220,10 @@ are used."
;; Read the next form and make an autoload.
(let* ((form (prog1 (read (current-buffer))
(or (bolp) (forward-line 1))))
- (autoload (make-autoload form load-name))
+ (autoload-1 (make-autoload form load-name))
+ (autoload (if (eq (car autoload-1) 'progn)
+ (cadr autoload-1)
+ autoload-1))
(doc-string-elt (get (car-safe form)
'doc-string-elt)))
(if autoload
@@ -267,7 +270,13 @@ are used."
outbuf))
(terpri outbuf)))
(let ((print-escape-newlines t))
- (print autoload outbuf))))
+ (print autoload outbuf)))
+ (if (eq (car autoload-1) 'progn)
+ ;; Print the rest of the form
+ (let ((print-escape-newlines t))
+ (mapcar (function (lambda (elt)
+ (print elt outbuf)))
+ (cddr autoload-1)))))
;; Copy the rest of the line to the output.
(princ (buffer-substring
(progn