(generate-file-autoloads): Undo previous change

because make-docfile requires defvar doc string to start on first line.
This commit is contained in:
Richard M. Stallman 1993-06-17 06:59:49 +00:00
parent 590cc44988
commit c751663136

View file

@ -146,46 +146,15 @@ are used."
(setq done-any t) (setq done-any t)
(if (eolp) (if (eolp)
;; Read the next form and make an autoload. ;; Read the next form and make an autoload.
(let* ((before (point)) (let* ((form (prog1 (read (current-buffer))
(form (prog1 (read (current-buffer))
(forward-line 1))) (forward-line 1)))
(autoload (make-autoload form load-name)) (autoload (make-autoload form load-name))
(doc-string-elt (get (car-safe form) (doc-string-elt (get (car-safe form)
'doc-string-elt))) 'doc-string-elt)))
(if (null autoload) (if autoload
;; We are copying a defvar or defconst form.
;; Copy the text instead of printing the form,
;; so as to preserve the original formatting.
(let ((inbuf (current-buffer))
(after (point)))
(save-excursion
(set-buffer outbuf)
;; Insert the form.
(insert-buffer-substring inbuf before after)
(and doc-string-elt
(stringp (nth doc-string-elt form))
;; The form has a docstring.
;; Hack it for make-docfile.
(save-excursion
;; Move point back to FORM's start.
(backward-char (- after before))
(skip-chars-forward " \t\n")
(or (looking-at "(")
(error "expected ("))
(forward-char 1) ; Skip the paren.
;; Skip sexps before the docstring.
(forward-sexp doc-string-elt)
(skip-chars-forward " \t")
(if (eolp) (delete-char 1))
(skip-chars-forward " \t")
(or (looking-at "\"")
(error "expected \""))
(forward-char 1) ; Skip the ".
(insert "\\\n"))) ;make-docfile happy.
(goto-char after)))
;; Write the autoload for this defun or defmacro.
(setq autoloads-done (cons (nth 1 form) (setq autoloads-done (cons (nth 1 form)
autoloads-done)) autoloads-done))
(setq autoload form))
(if (and doc-string-elt (if (and doc-string-elt
(stringp (nth doc-string-elt autoload))) (stringp (nth doc-string-elt autoload)))
;; We need to hack the printing because the ;; We need to hack the printing because the
@ -212,7 +181,7 @@ are used."
1) 1)
outbuf)) outbuf))
(terpri outbuf)) (terpri outbuf))
(print autoload outbuf)))) (print autoload outbuf)))
;; Copy the rest of the line to the output. ;; Copy the rest of the line to the output.
(let ((begin (point))) (let ((begin (point)))
(forward-line 1) (forward-line 1)