(update-file-autoloads): Go to the beginning of FILE before searching it
authorRoland McGrath <roland@gnu.org>
Sun, 18 Jul 1993 20:01:03 +0000 (20:01 +0000)
committerRoland McGrath <roland@gnu.org>
Sun, 18 Jul 1993 20:01:03 +0000 (20:01 +0000)
for generate-autoload-cookie.

lisp/emacs-lisp/autoload.el

index 0950a1a..8c18407 100644 (file)
@@ -263,7 +263,10 @@ autoloads go somewhere else.")
          (if (save-excursion
                (set-buffer (find-file-noselect file))
                (save-excursion
-                 (search-forward generate-autoload-cookie nil t)))
+                 (save-restriction
+                   (widen)
+                   (goto-char (point-min))
+                   (search-forward generate-autoload-cookie nil t))))
              ;; There are autoload cookies in FILE.
              ;; Have the user tell us where to put the new section.
              (progn