comparison lisp/emacs-lisp/autoload.el @ 22003:ea83fc4c4f77

(generate-file-autoloads): Handle progn forms generated by make-autoload: print just the first subform with print-escape-newlines.
author Richard M. Stallman <rms@gnu.org>
date Sat, 09 May 1998 07:02:50 +0000
parents 89c1bfb63571
children 00ce0bf9b723
comparison
equal deleted inserted replaced
22002:c40d3d44e6fd 22003:ea83fc4c4f77
218 (setq done-any t) 218 (setq done-any t)
219 (if (eolp) 219 (if (eolp)
220 ;; Read the next form and make an autoload. 220 ;; Read the next form and make an autoload.
221 (let* ((form (prog1 (read (current-buffer)) 221 (let* ((form (prog1 (read (current-buffer))
222 (or (bolp) (forward-line 1)))) 222 (or (bolp) (forward-line 1))))
223 (autoload (make-autoload form load-name)) 223 (autoload-1 (make-autoload form load-name))
224 (autoload (if (eq (car autoload-1) 'progn)
225 (cadr autoload-1)
226 autoload-1))
224 (doc-string-elt (get (car-safe form) 227 (doc-string-elt (get (car-safe form)
225 'doc-string-elt))) 228 'doc-string-elt)))
226 (if autoload 229 (if autoload
227 (setq autoloads-done (cons (nth 1 form) 230 (setq autoloads-done (cons (nth 1 form)
228 autoloads-done)) 231 autoloads-done))
265 (prin1-to-string (cdr elt)) 268 (prin1-to-string (cdr elt))
266 1) 269 1)
267 outbuf)) 270 outbuf))
268 (terpri outbuf))) 271 (terpri outbuf)))
269 (let ((print-escape-newlines t)) 272 (let ((print-escape-newlines t))
270 (print autoload outbuf)))) 273 (print autoload outbuf)))
274 (if (eq (car autoload-1) 'progn)
275 ;; Print the rest of the form
276 (let ((print-escape-newlines t))
277 (mapcar (function (lambda (elt)
278 (print elt outbuf)))
279 (cddr autoload-1)))))
271 ;; Copy the rest of the line to the output. 280 ;; Copy the rest of the line to the output.
272 (princ (buffer-substring 281 (princ (buffer-substring
273 (progn 282 (progn
274 ;; Back up over whitespace, to preserve it. 283 ;; Back up over whitespace, to preserve it.
275 (skip-chars-backward " \f\t") 284 (skip-chars-backward " \f\t")