summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-01-04 20:08:50 +0000
committerRoland McGrath <roland@gnu.org>1996-01-04 20:08:50 +0000
commit6e21af562673588801f18e73425e811d3aa2a9f0 (patch)
tree5b16642322200b6d32375eb7081ebef68a4ad737 /lisp/emacs-lisp
parentaa308ce238add47d57734c5747329c60d2933b8f (diff)
downloademacs-6e21af562673588801f18e73425e811d3aa2a9f0.tar.gz
emacs-6e21af562673588801f18e73425e811d3aa2a9f0.tar.bz2
emacs-6e21af562673588801f18e73425e811d3aa2a9f0.zip
(generate-file-autoloads): Preserve whitespace after cookie in literal text
copied to output; eat only a single space.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/autoload.el15
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index cccfbedcfe1..0a38a1539fa 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -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))