Commits

Anonymous committed 9798edd

* Fixed vendor to load personal customization on autoload functions only after the mode is loaded.

Comments (0)

Files changed (1)

          (normal (concat "~/.emacs.d/vendor/" file))
          (suffix (concat normal ".el"))
          (personal (concat "~/.emacs.d/files/" file))
-   (found nil))
+         (found nil))
     (cond
      ((file-directory-p normal) (add-to-list 'load-path normal) (set 'found t))
      ((file-directory-p suffix) (add-to-list 'load-path suffix) (set 'found t))
      ((file-exists-p suffix)  (set 'found t)))
     (when found
       (if autoload-functions
-          (dolist (autoload-function autoload-functions)
-            (autoload autoload-function (symbol-name library) nil t))
-        (require library)))
-    (when (file-exists-p (concat personal ".el"))
-      (load personal))))
+          (progn (dolist (autoload-function autoload-functions)
+                   (autoload autoload-function (symbol-name library) nil t))
+                 (eval-after-load library
+                   `(when (file-exists-p (concat ,personal ".el"))
+                      (load ,personal))))
+        (require library)
+        (when (file-exists-p (concat personal ".el"))
+          (load personal))))))
 
 ;; Quickly jump back and forth between matching parens/brackets
 (defun match-paren (arg)