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=-c 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'. --- 4120b2c6117642e02113e576a573bf8d60ec4c72 diff --combined dot/emacs index 31cfd15,40280de..f1bcfbf --- a/dot/emacs +++ b/dot/emacs @@@ -21,7 -21,18 +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 +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)) @@@ -213,8 -222,6 +222,8 @@@ "\\)") addr) (concat "submit@bugs." (match-string 1 addr))) + ((string-match "^\\([^@+]+\\)\\+[^@]*\\(@.*\\)$" addr) + (concat (match-string 1 addr) (match-string 2 addr))) (t addr)))) ;; Customization. @@@ -486,8 -493,7 +495,8 @@@ ;; Default frame size. -(setq default-frame-alist +(setq frame-background-mode (if mdw-black-background 'dark 'light) + default-frame-alist `((width . ,(if (>= emacs-major-version 21) 77 78)) (height . 33) (vertical-scroll-bars . right) @@@ -499,7 -505,7 +508,7 @@@ (tool-bar-lines . 0) (menu-bar-lines . 1) (cursor-color . "red") - (background-mode . ,(if mdw-black-background 'dark 'light))) + (background-mode . ,frame-background-mode)) initial-frame-alist `((width . ,(if (>= emacs-major-version 21) 77 78)) (menu-bar-lines . ,(if window-system 1 0))) @@@ -545,7 -551,7 +554,7 @@@ (global-set-key [?\C-x ?3] 'mdw-split-window-horizontally) (global-set-key [?\M-#] 'calc-dispatch) (global-set-key [?\C-x ?/] 'auto-fill-mode) - (global-set-key [?\C-x ?w ?d] 'mdw-divvy-window) + (global-set-key [?\C-c ?w ?d] 'mdw-divvy-window) (global-set-key [insertchar] 'overwrite-mode) (global-set-key [?\C-x ?\C-n] 'skel-create-file) (global-set-key [?\C-x ?4 ?n] 'skel-create-file-other-window)