Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/profile
authorMark Wooding <mdw@distorted.org.uk>
Fri, 25 Mar 2016 13:49:41 +0000 (13:49 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 25 Mar 2016 13:49:41 +0000 (13:49 +0000)
* 'master' of git.distorted.org.uk:~mdw/publish/public-git/profile:
  dot/emacs: More sophisticated setup of `load-path'.

1  2 
dot/emacs

diff --combined dot/emacs
+++ b/dot/emacs
  ;;; 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)
  
  
  ;; 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))
  
                                     "\\)")
                             addr)
               (concat "submit@bugs." (match-string 1 addr)))
 +            ((string-match "^\\([^@+]+\\)\\+[^@]*\\(@.*\\)$" addr)
 +             (concat (match-string 1 addr) (match-string 2 addr)))
              (t addr))))
  
  ;; Customization.
  
  ;; 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)
        (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)))
    (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)