changeset 5854:9d1ae808403b

(generate-file-autoloads): Don't frob literal formfeeds into \f; just bind print-escape-newlines to t around printing (now has same effect).
author Roland McGrath <roland@gnu.org>
date Tue, 08 Feb 1994 23:03:09 +0000
parents 4934e5381fb2
children c23afcf4e954
files lisp/emacs-lisp/autoload.el
diffstat 1 files changed, 36 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/autoload.el	Tue Feb 08 22:46:59 1994 +0000
+++ b/lisp/emacs-lisp/autoload.el	Tue Feb 08 23:03:09 1994 +0000
@@ -155,38 +155,36 @@
 		    (search-forward generate-autoload-cookie)
 		    (skip-chars-forward " \t")
 		    (setq done-any t)
-		    (let ((begin (save-excursion (set-buffer outbuf)
-						 (point))))
-		      (if (eolp)
-			  ;; Read the next form and make an autoload.
-			  (let* ((form (prog1 (read (current-buffer))
-					 (forward-line 1)))
-				 (autoload (make-autoload form load-name))
-				 (doc-string-elt (get (car-safe form)
-						      'doc-string-elt)))
-			    (if autoload
-				(setq autoloads-done (cons (nth 1 form)
-							   autoloads-done))
-			      (setq autoload form))
-			    (if (and doc-string-elt
-				     (stringp (nth doc-string-elt autoload)))
-				;; We need to hack the printing because the
-				;; doc-string must be printed specially for
-				;; make-docfile (sigh).
-				(let* ((p (nthcdr (1- doc-string-elt)
-						  autoload))
-				       (elt (cdr p)))
-				  (setcdr p nil)
-				  (princ "\n(" outbuf)
-				  (let ((print-escape-newlines t))
-				    (mapcar (function (lambda (elt)
-							(prin1 elt outbuf)
-							(princ " " outbuf)))
-					    autoload))
-				  (princ "\"\\\n" outbuf)
-				  (let ((begin (save-excursion
-						 (set-buffer outbuf)
-						 (point))))
+		    (if (eolp)
+			;; Read the next form and make an autoload.
+			(let* ((form (prog1 (read (current-buffer))
+				       (forward-line 1)))
+			       (autoload (make-autoload form load-name))
+			       (doc-string-elt (get (car-safe form)
+						    'doc-string-elt)))
+			  (if autoload
+			      (setq autoloads-done (cons (nth 1 form)
+							 autoloads-done))
+			    (setq autoload form))
+			  (if (and doc-string-elt
+				   (stringp (nth doc-string-elt autoload)))
+			      ;; We need to hack the printing because the
+			      ;; doc-string must be printed specially for
+			      ;; make-docfile (sigh).
+			      (let* ((p (nthcdr (1- doc-string-elt)
+						autoload))
+				     (elt (cdr p)))
+				(setcdr p nil)
+				(princ "\n(" outbuf)
+				(let ((print-escape-newlines t))
+				  (mapcar (function (lambda (elt)
+						      (prin1 elt outbuf)
+						      (princ " " outbuf)))
+					  autoload))
+				(princ "\"\\\n" outbuf)
+				(let ((begin (save-excursion
+					       (set-buffer outbuf)
+					       (point))))
 				  (princ (substring
 					  (prin1-to-string (car elt)) 1)
 					 outbuf)
@@ -206,19 +204,13 @@
 					    (prin1-to-string (cdr elt))
 					    1)
 					   outbuf))
-				  (terpri outbuf))
+				  (terpri outbuf)))
+			    (let ((print-escape-newlines t))
 			      (print autoload outbuf)))
-			;; Copy the rest of the line to the output.
-			(let ((begin (point)))
-			  (forward-line 1)
-			  (princ (buffer-substring begin (point)) outbuf)))
-		      (save-excursion
-			(set-buffer outbuf)
-			;; Replace literal ^Ls with \f in what we just wrote.
-			(save-excursion
-			  (while (search-backward "\f" begin t)
-			    (delete-char 1)
-			    (insert "\\f"))))))
+			  ;; Copy the rest of the line to the output.
+			  (let ((begin (point)))
+			    (forward-line 1)
+			    (princ (buffer-substring begin (point)) outbuf)))))
 		   ((looking-at ";")
 		    ;; Don't read the comment.
 		    (forward-line 1))