From: Mark Wooding Date: Fri, 25 Mar 2016 13:49:41 +0000 (+0000) Subject: Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/profile X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/4120b2c6117642e02113e576a573bf8d60ec4c72?hp=2d14c35371483621691ade4d71d16e3ea5e82a9b Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/profile * 'master' of git.distorted.org.uk:~mdw/publish/public-git/profile: dot/emacs: More sophisticated setup of `load-path'. --- diff --git a/dot/emacs b/dot/emacs index 31cfd15..f1bcfbf 100644 --- a/dot/emacs +++ b/dot/emacs @@ -21,7 +21,18 @@ ;;; along with this program; if not, write to the Free Software ;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA -(setq load-path (nconc load-path (list "~/lib/emacs"))) +(let ((path "~/lib/emacs/") + (pkgs (list "bbdb/" "multiple-cursors/" "rust-mode/")) + pkg) + (setq load-path (nconc load-path (list path))) + (while (setq pkg (pop pkgs)) + (let ((dir (concat path pkg))) + (if (file-exists-p dir) + (setq load-path (nconc load-path (list dir)))))) + (let ((boot (concat path "mdw-pkgs.el"))) + (if (file-exists-p boot) + (load boot)))) + (require 'dot-emacs) (require 'cl) @@ -88,14 +99,12 @@ ;; Multiple cursors. -(setq load-path (nconc load-path (list "~/lib/emacs/multiple-cursors/"))) (global-set-key [?\C-c ?r] 'mdw-multiple-cursors-keymap) (autoload 'mdw-multiple-cursors-keymap "mdw-multiple-cursors.el" "A keymap for Magnar Sveen's awesome multiple-cursors." nil 'keymap) ;; Rust mode. -(setq load-path (nconc load-path (list "~/lib/emacs/rust-mode/"))) (autoload 'rust-mode "rust-mode" nil t) (add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))