Bugfix: Place load-path statements at the beginning of loaddefs files.master
authorTom Breton (Tehom) <tehom@panix.com>
Tue, 11 Jan 2011 23:24:59 +0000 (11 18:24 -0500)
committerTom Breton (Tehom) <tehom@panix.com>
Tue, 11 Jan 2011 23:24:59 +0000 (11 18:24 -0500)
elinstall.el

index ec1c7e9..4aa37d5 100644 (file)
@@ -597,10 +597,12 @@ Current buffer must be a loaddef-style file."
            (unless found
               (progn
                  (setq found 'new)
-                 ;; No later sections in the file.  Put before the last page.
-                 (goto-char (point-max))
-                 (search-backward "\f" nil t)))
-
+                 ;; No later sections in the file.  Put first in file.
+                 (goto-char (point-min))
+                 (when
+                    (search-forward "\f" nil t)
+                    (goto-char (match-beginning 0)))))
+           
            (elinstall-generate-add-to-path path-element type)))
 
       ;;This never belongs in the no-autoloads section.