forked from magnars/.emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
my-misc.el
45 lines (35 loc) · 1.32 KB
/
my-misc.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
;; Seed the random-number generator
(random t)
;; Keep region when undoing in region
(defadvice undo-tree-undo (around keep-region activate)
(if (use-region-p)
(let ((m (set-marker (make-marker) (mark)))
(p (set-marker (make-marker) (point))))
ad-do-it
(goto-char p)
(set-mark m)
(set-marker p nil)
(set-marker m nil))
ad-do-it))
;; Whitespace-style
(setq whitespace-style '(trailing lines space-before-tab
indentation space-after-tab)
whitespace-line-column 100)
;; Add Urban Dictionary to webjump (C-x g)
(eval-after-load "webjump"
'(add-to-list 'webjump-sites '("Urban Dictionary" .
[simple-query
"www.urbandictionary.com"
"http://www.urbandictionary.com/define.php?term="
""])))
;; Fix whitespace on save, but only if the file was clean
(global-whitespace-cleanup-mode)
;; Use normal tabs in makefiles
(add-hook 'makefile-mode-hook 'indent-tabs-mode)
;; Trademark on C-x 8 t m
(global-set-key (kbd "C-x 8 t m") (λ (insert "™")))
;; Add JSP expansions to html-mode
(eval-after-load "sgml-mode" '(require 'jsp-expansions))
;; A bit of misc cargo culting in misc.el
(setq xterm-mouse-mode t)
(provide 'my-misc)