3 # if for some reason, things get pear-shaped, we want to be able to
4 # enter the debugger by sending -USR2 to emacs
6 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
7 (setq debug-on-event 'siguser2)
11 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
12 (add-to-list 'load-path '"~/lib/emacs_el/")
13 (add-to-list 'load-path '"~/lib/emacs_el/helm")
14 (add-to-list 'load-path '"~/lib/emacs_el/tiny-tools/lisp/tiny")
15 (add-to-list 'load-path '"~/lib/emacs_el/tiny-tools/lisp/other")
21 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
22 ;; From http://www.emacswiki.org/emacs/LoadingLispFiles
23 ;; execute conditional code when loading libraries
24 (defmacro with-library (symbol &rest body)
25 `(when (require ,symbol nil t)
27 (put 'with-library 'lisp-indent-function 1)
35 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
37 (with-library 'tinyprocmail
38 ; (setq tinyprocmail--procmail-version "v3.22")
39 (add-hook 'tinyprocmail--load-hook 'tinyprocmail-install))
43 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
44 ; don't verify where we are pushing
45 (setq magit-push-always-verify nil)
49 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
51 ;; Use c-mode for perl .xs files
52 (add-to-list 'auto-mode-alist '("\\.xs\\'" . c-mode))
53 (add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode))
54 (add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
55 (add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode))
56 (add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode))
59 cperl-auto-newline nil
60 cperl-auto-newline-after-colon nil
61 cperl-continued-statement-offset 4
63 cperl-continued-brace-offset 0
65 cperl-highlight-variables-indiscriminately t
66 cperl-electric-lbrace-space nil
67 cperl-indent-parens-as-block nil
68 cperl-close-paren-offset -1
69 cperl-tab-always-indent t)
70 ;(add-hook 'cperl-mode-hook (lambda () (cperl-set-style "PerlStyle")))
74 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
78 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
83 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
84 (add-to-list 'tramp-methods '("vcsh"
85 (tramp-login-program "vcsh")
89 (tramp-remote-shell "/bin/sh")
90 (tramp-remote-shell-args
94 ** Override other things
95 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
96 ; apparently things like to step on C-;, so we'll use a hack from
97 ; http://stackoverflow.com/questions/683425/globally-override-key-binding-in-emacs/5340797#5340797 to fix this
99 (defvar my-keys-minor-mode-map (make-keymap) "my-keys-minor-mode keymap.")
101 ; use iedit everywhere
102 (define-key my-keys-minor-mode-map (kbd "C-;") 'iedit-mode)
103 ;; use outline mode keybindings everywhere
104 (define-key my-keys-minor-mode-map (kbd "C-;") 'my/mydra-outline/body)
106 (define-minor-mode my-keys-minor-mode
107 "A minor mode so that my key settings override annoying major modes."
108 t " my-keys" 'my-keys-minor-mode-map)
110 (my-keys-minor-mode 1)
111 (defun my-minibuffer-setup-hook ()
112 (my-keys-minor-mode 0))
114 (add-hook 'minibuffer-setup-hook 'my-minibuffer-setup-hook)
115 (defadvice load (after give-my-keybindings-priority)
116 "Try to ensure that my keybindings always have priority."
117 (if (not (eq (car (car minor-mode-map-alist)) 'my-keys-minor-mode))
118 (let ((mykeys (assq 'my-keys-minor-mode minor-mode-map-alist)))
119 (assq-delete-all 'my-keys-minor-mode minor-mode-map-alist)
120 (add-to-list 'minor-mode-map-alist mykeys))))
125 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
126 (provide 'don-configuration)