]> git.eshelyaron.com Git - emacs.git/commitdiff
(generate-file-autoloads): Preserve whitespace after cookie in literal text
authorRoland McGrath <roland@gnu.org>
Thu, 4 Jan 1996 20:08:50 +0000 (20:08 +0000)
committerRoland McGrath <roland@gnu.org>
Thu, 4 Jan 1996 20:08:50 +0000 (20:08 +0000)
copied to output; eat only a single space.

lisp/emacs-lisp/autoload.el

index cccfbedcfe156a46a5ece05e3d782f1d79661d6a..0a38a1539fad32d5d2552efc86371d0eef9591ad 100644 (file)
@@ -1,6 +1,6 @@
 ;;; autoload.el --- maintain autoloads in loaddefs.el.
 
-;;; Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
 ;;;
 ;; Author: Roland McGrath <roland@gnu.ai.mit.edu>
 ;; Keywords: maint
@@ -221,9 +221,16 @@ are used."
                            (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))))
+                     (princ (buffer-substring
+                             (progn
+                               ;; Back up over whitespace, to preserve it.
+                               (skip-chars-backward " \f\t")
+                               (if (= (char-after (1+ (point))) ? )
+                                   ;; Eat one space.
+                                   (forward-char 1))
+                               (point))
+                             (progn (forward-line 1) (point)))
+                            outbuf)))
                   ((looking-at ";")
                    ;; Don't read the comment.
                    (forward-line 1))