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
45 ;; Use c-mode for perl .xs files
46 (add-to-list 'auto-mode-alist '("\\.xs\\'" . c-mode))
47 (add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode))
48 (add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
49 (add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode))
50 (add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode))
53 cperl-auto-newline nil
54 cperl-auto-newline-after-colon nil
55 cperl-continued-statement-offset 4
57 cperl-continued-brace-offset 0
59 cperl-highlight-variables-indiscriminately t
60 cperl-electric-lbrace-space nil
61 cperl-indent-parens-as-block nil
62 cperl-close-paren-offset -1
63 cperl-tab-always-indent t)
64 ;(add-hook 'cperl-mode-hook (lambda () (cperl-set-style "PerlStyle")))
68 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
72 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
77 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
78 (add-to-list 'tramp-methods '("vcsh"
79 (tramp-login-program "vcsh")
83 (tramp-remote-shell "/bin/sh")
84 (tramp-remote-shell-args
88 ** Override other things
89 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
90 ; apparently things like to step on C-;, so we'll use a hack from
91 ; http://stackoverflow.com/questions/683425/globally-override-key-binding-in-emacs/5340797#5340797 to fix this
93 (defvar my-keys-minor-mode-map (make-keymap) "my-keys-minor-mode keymap.")
95 ; use iedit everywhere
96 (define-key my-keys-minor-mode-map (kbd "C-;") 'iedit-mode)
97 ;; use outline mode keybindings everywhere
98 (define-key my-keys-minor-mode-map (kbd "C-;") 'my/mydra-outline/body)
100 (define-minor-mode my-keys-minor-mode
101 "A minor mode so that my key settings override annoying major modes."
102 t " my-keys" 'my-keys-minor-mode-map)
104 (my-keys-minor-mode 1)
105 (defun my-minibuffer-setup-hook ()
106 (my-keys-minor-mode 0))
108 (add-hook 'minibuffer-setup-hook 'my-minibuffer-setup-hook)
109 (defadvice load (after give-my-keybindings-priority)
110 "Try to ensure that my keybindings always have priority."
111 (if (not (eq (car (car minor-mode-map-alist)) 'my-keys-minor-mode))
112 (let ((mykeys (assq 'my-keys-minor-mode minor-mode-map-alist)))
113 (assq-delete-all 'my-keys-minor-mode minor-mode-map-alist)
114 (add-to-list 'minor-mode-map-alist mykeys))))
119 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
120 (provide 'don-configuration)