Mercurial > hg > dotemacs
annotate dotemacs.el @ 39:96e72d04230b
Use copyright symbol in legalese, unbind M-s
author | Jordi Gutiérrez Hermoso <jordigh@gmail.com> |
---|---|
date | Sat, 16 Apr 2011 22:09:56 -0500 |
parents | e733369c5233 |
children | 02441454df4d |
rev | line source |
---|---|
0 | 1 (custom-set-variables |
2 ;; custom-set-variables was added by Custom. | |
3 ;; If you edit it by hand, you could mess it up, so be careful. | |
4 ;; Your init file should contain only one such instance. | |
5 ;; If there is more than one, they won't work right. | |
6 '(LaTeX-indent-level 2) | |
7 '(LaTeX-item-indent 0) | |
8 '(TeX-PDF-mode t) | |
9 '(TeX-brace-indent-level 2) | |
10 '(TeX-debug-bad-boxes t) | |
11 '(TeX-debug-warnings t) | |
12 '(TeX-display-help nil) | |
13 '(TeX-newline-function (quote reindent-then-newline-and-indent)) | |
14 '(TeX-output-view-style (quote (("^dvi$" ("^landscape$" "^pstricks$\\|^pst-\\|^psfrag$") "%(o?)dvips -t landscape %d -o && gv %f") ("^dvi$" "^pstricks$\\|^pst-\\|^psfrag$" "%(o?)dvips %d -o && gv %f") ("^dvi$" ("^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$" "^landscape$") "%(o?)xdvi %dS -paper a4r -s 0 %d") ("^dvi$" "^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$" "%(o?)xdvi %dS -paper a4 %d") ("^dvi$" ("^a5\\(?:comb\\|paper\\)$" "^landscape$") "%(o?)xdvi %dS -paper a5r -s 0 %d") ("^dvi$" "^a5\\(?:comb\\|paper\\)$" "%(o?)xdvi %dS -paper a5 %d") ("^dvi$" "^b5paper$" "%(o?)xdvi %dS -paper b5 %d") ("^dvi$" "^letterpaper$" "%(o?)xdvi %dS -paper us %d") ("^dvi$" "^legalpaper$" "%(o?)xdvi %dS -paper legal %d") ("^dvi$" "^executivepaper$" "%(o?)xdvi %dS -paper 7.25x10.5in %d") ("^dvi$" "." "%(o?)xdvi %dS %d") ("^pdf$" "." "evince %o %(outpage)") ("^html?$" "." "netscape %o")))) | |
35
36448fcd7202
Set a few Customise variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
34
diff
changeset
|
15 '(TeX-view-program-selection (quote (((output-dvi style-pstricks) "dvips and gv") (output-dvi "Evince") (output-pdf "Evince") (output-html "xdg-open")))) |
36448fcd7202
Set a few Customise variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
34
diff
changeset
|
16 '(add-log-mailing-address "jordigh@gmail.com") |
0 | 17 '(auto-compression-mode t nil (jka-compr)) |
7
2c6fced452ac
Don't indent in namespace blocks, don't follow symlinks in VC
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
18 '(c-offsets-alist (quote ((substatement-open . 0) (innamespace . 0)))) |
0 | 19 '(case-fold-search t) |
3
f25df4483e30
Add column number mode, comment out manual inclusion of cmake-mode, make default font smaller
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
20 '(column-number-mode t) |
0 | 21 '(comint-input-autoexpand (quote history)) |
22 '(comint-move-point-for-output (quote all)) | |
23 '(comint-prompt-read-only t) | |
24 '(comint-scroll-to-bottom-on-input (quote all)) | |
25 '(compilation-scroll-output t) | |
26 '(confirm-kill-emacs (quote yes-or-no-p)) | |
27 '(cperl-auto-newline nil) | |
28 '(cperl-close-paren-offset 0) | |
29 '(cperl-electric-backspace-untabify nil) | |
30 '(cperl-highlight-variables-indiscriminately t) | |
31 '(cperl-merge-trailing-else nil) | |
32 '(current-language-environment "UTF-8") | |
33 '(debian-changelog-full-name "Jordi Gutiérrez Hermoso") | |
34 '(debian-changelog-mailing-address "jordigh@gmail.com") | |
35 '(default-input-method "latin-1-prefix") | |
18
a48ef65db31f
Some ECB configs
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
17
diff
changeset
|
36 '(ecb-options-version "2.32") |
a48ef65db31f
Some ECB configs
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
17
diff
changeset
|
37 '(ecb-tip-of-the-day nil) |
0 | 38 '(ediff-split-window-function (quote split-window-horizontally)) |
9
31bf8e120ebf
Customize diff colours, thanks to #emacs quicksilver for the head start
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
39 '(erc-input-line-position 0) |
20
d8cde0480aec
Add django and legalese modes
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
19
diff
changeset
|
40 '(erc-modules (quote (autojoin button completion fill irccontrols list match menu move-to-prompt netsplit networks noncommands readonly ring scrolltobottom stamp track))) |
0 | 41 '(global-font-lock-mode t nil (font-lock)) |
42 '(indent-tabs-mode nil) | |
16
b8eeda0a7bad
Inhibit startup buffer menu
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
15
diff
changeset
|
43 '(inhibit-startup-buffer-menu t) |
0 | 44 '(inhibit-startup-screen t) |
45 '(jde-jdk-registry (quote (("1.6.0" . "/usr/lib/jvm/java-6-openjdk")))) | |
46 '(js2-auto-indent-flag nil) | |
47 '(js2-bounce-indent-flag nil) | |
48 '(js2-enter-indents-newline nil) | |
49 '(js2-mirror-mode nil) | |
20
d8cde0480aec
Add django and legalese modes
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
19
diff
changeset
|
50 '(legalese-default-author "Jordi Gutiérrez Hermoso") |
39
96e72d04230b
Use copyright symbol in legalese, unbind M-s
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
36
diff
changeset
|
51 '(legalese-default-copyright "Jordi Gutiérrez Hermoso <jordigh@gmail.com>") |
0 | 52 '(make-backup-files nil) |
9
31bf8e120ebf
Customize diff colours, thanks to #emacs quicksilver for the head start
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
53 '(menu-bar-mode t) |
25
67a96731dbab
Make ipython default in Python; don't open more than one window when starting up with multiple files; attempt to do comments in Django.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
24
diff
changeset
|
54 '(py-python-command "ipython") |
35
36448fcd7202
Set a few Customise variables
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
34
diff
changeset
|
55 '(safe-local-variable-values (quote ((nil (mode . html) (mode . longlines)) (longlines-mode \.) (html-mode \.) (longlines-mode) (html-mode)))) |
0 | 56 '(savehist-mode t nil (savehist)) |
57 '(show-paren-mode t) | |
58 '(tab-width 2) | |
59 '(tabbar-mode t nil (tabbar)) | |
60 '(text-mode-hook (quote (text-mode-hook-identify))) | |
61 '(tool-bar-mode nil) | |
62 '(transient-mark-mode nil) | |
63 '(uniquify-buffer-name-style (quote forward) nil (uniquify)) | |
7
2c6fced452ac
Don't indent in namespace blocks, don't follow symlinks in VC
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
6
diff
changeset
|
64 '(vc-follow-symlinks nil) |
0 | 65 '(w3m-default-display-inline-images t) |
66 '(w3m-use-cookies t)) | |
67 (custom-set-faces | |
68 ;; custom-set-faces was added by Custom. | |
69 ;; If you edit it by hand, you could mess it up, so be careful. | |
70 ;; Your init file should contain only one such instance. | |
71 ;; If there is more than one, they won't work right. | |
27
8763b5053360
Change default font
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
25
diff
changeset
|
72 '(default ((t (:inherit nil :stipple nil :background "grey20" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98 :width normal :foundry "unknown" :family "Liberation Mono")))) |
9
31bf8e120ebf
Customize diff colours, thanks to #emacs quicksilver for the head start
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
73 '(diff-added ((t (:foreground "green")))) |
31bf8e120ebf
Customize diff colours, thanks to #emacs quicksilver for the head start
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
74 '(diff-changed ((t (:foreground "orange")))) |
31bf8e120ebf
Customize diff colours, thanks to #emacs quicksilver for the head start
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
75 '(diff-file-header ((((class color) (background light)) (:background "lightblue" :bold t)))) |
31bf8e120ebf
Customize diff colours, thanks to #emacs quicksilver for the head start
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
76 '(diff-header ((nil (:foreground "skyblue")))) |
28
214a64830015
Set better colour for diff mode, remove bannerwhen calling python mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
27
diff
changeset
|
77 '(diff-refine-change ((((class color) (min-colors 88) (background dark)) (:background "#004090")))) |
17
8e043fc0f396
Change the colour of highlighted tabs
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
16
diff
changeset
|
78 '(diff-removed ((t (:foreground "red")))) |
18
a48ef65db31f
Some ECB configs
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
17
diff
changeset
|
79 '(ecb-tag-header-face ((((class color) (background dark)) (:background "DarkGreen")))) |
33
0479db13b7e8
Add stripes-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
31
diff
changeset
|
80 '(show-ws-tab ((t (:background "Black")))) |
0479db13b7e8
Add stripes-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
31
diff
changeset
|
81 '(stripes-face ((t (:background "#444"))))) |
0 | 82 |
1 | 83 (add-to-list 'load-path "~/.emacs.d/plugins/") |
0 | 84 |
85 (defalias 'perl-mode 'cperl-mode) | |
86 | |
8
04f1a90eca70
Restore ipython mode, remove manual inclusion of cmake-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
7
diff
changeset
|
87 (require 'ipython) |
28
214a64830015
Set better colour for diff mode, remove bannerwhen calling python mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
27
diff
changeset
|
88 (setq py-python-command-args '("-nobanner")) |
0 | 89 |
20
d8cde0480aec
Add django and legalese modes
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
19
diff
changeset
|
90 (require 'legalese) |
d8cde0480aec
Add django and legalese modes
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
19
diff
changeset
|
91 |
23
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
92 (require 'django-mode) |
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
93 |
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
94 (require 'rainbow-mode) |
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
95 |
34
bc465cea7922
Require stripes-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
33
diff
changeset
|
96 (require 'stripes) |
bc465cea7922
Require stripes-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
33
diff
changeset
|
97 |
30
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
98 ;; Use org-mode to write blogthings |
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
99 (setq load-path (cons "~/.emacs.d/plugins/org2blog/" load-path)) |
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
100 (require 'org2blog) |
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
101 |
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
102 (setq org2blog-server-url "http://jordi.inversethought.com/xmlrpc.php" |
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
103 org2blog-server-user "jordigh" |
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
104 org2blog-server-weblog-id "") |
307f33925be1
Use org-mode to write blogthings
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
29
diff
changeset
|
105 |
0 | 106 (server-start) |
107 | |
108 ;(define-derived-mode tabified-python-mode python-mode | |
109 ; "tabified Python" (setq indent-tabs-mode t)) | |
110 | |
111 ;; wtf is this crap? begone! | |
112 (setq transient-mark-mode nil) | |
113 | |
114 (global-set-key (kbd "C-S-n") 'tabbar-forward-tab) | |
115 (global-set-key (kbd "C-S-p") 'tabbar-backward-tab) | |
116 (global-set-key (kbd "C-c C-S-n") 'tabbar-forward-group) | |
117 (global-set-key (kbd "C-c C-S-p") 'tabbar-backward-group) | |
118 | |
119 (global-set-key (kbd "C-S-j") 'windmove-down) | |
120 (global-set-key (kbd "C-S-k") 'windmove-up) | |
121 (global-set-key (kbd "C-S-h") 'windmove-left) | |
122 (global-set-key (kbd "C-S-l") 'windmove-right) | |
123 | |
36 | 124 (global-set-key (kbd "M-<down>") 'gud-next) |
125 (global-set-key (kbd "M-<right>") 'gud-step) | |
126 (global-set-key (kbd "M-<left>") 'gud-finish) | |
127 (global-set-key (kbd "M-<RET>") 'gud-cont) | |
128 (global-unset-key (kbd "C-x <DEL>")) | |
129 (global-set-key (kbd "C-x <DEL>") 'gud-remove) | |
130 | |
13
24194e20af48
Make kill-buffer always kill current buffer
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
131 ;; Only killing the current buffer is useful (thanks to madpickle of #emacs) |
15
b1a031281538
Fix the kill buffer keybinding
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
14
diff
changeset
|
132 (global-set-key (kbd "C-x k") |
13
24194e20af48
Make kill-buffer always kill current buffer
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
133 (lambda () (interactive) (kill-buffer (current-buffer)))) |
24194e20af48
Make kill-buffer always kill current buffer
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
12
diff
changeset
|
134 |
0 | 135 (setq auto-mode-alist |
136 (append | |
137 '( | |
23
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
138 ("\\.m\\'" . octave-mode) |
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
139 ("\\.eml\\'" . mail-mode) |
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
140 ("\\.pro\\'" . conf-mode) ;; Qt project files |
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
141 ) |
0 | 142 auto-mode-alist)) |
143 | |
31
66007544445e
Remove smooth-scrolling.el, use builtin variables instead
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
30
diff
changeset
|
144 ;; Scroll smoothly |
66007544445e
Remove smooth-scrolling.el, use builtin variables instead
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
30
diff
changeset
|
145 (setq scroll-step 1000) |
66007544445e
Remove smooth-scrolling.el, use builtin variables instead
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
30
diff
changeset
|
146 (setq scroll-conservatively 1000) |
0 | 147 |
24 | 148 ;; This ido thing looks interesting... |
149 (ido-mode 1) | |
150 | |
0 | 151 (setq default-major-mode 'text-mode) |
152 (global-unset-key "\C-z") | |
153 | |
25
67a96731dbab
Make ipython default in Python; don't open more than one window when starting up with multiple files; attempt to do comments in Django.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
24
diff
changeset
|
154 ;; Don't like it when several windows open upon emacs startup |
67a96731dbab
Make ipython default in Python; don't open more than one window when starting up with multiple files; attempt to do comments in Django.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
24
diff
changeset
|
155 ;; (Thanks theseb of #emacs) |
67a96731dbab
Make ipython default in Python; don't open more than one window when starting up with multiple files; attempt to do comments in Django.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
24
diff
changeset
|
156 (add-hook 'window-setup-hook 'delete-other-windows) |
67a96731dbab
Make ipython default in Python; don't open more than one window when starting up with multiple files; attempt to do comments in Django.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
24
diff
changeset
|
157 (add-to-list 'same-window-buffer-names "*Buffer List*") |
67a96731dbab
Make ipython default in Python; don't open more than one window when starting up with multiple files; attempt to do comments in Django.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
24
diff
changeset
|
158 |
0 | 159 ;; Set auto-fill for all modes |
160 ;(setq-default auto-fill-function 'do-auto-fill) | |
161 | |
12
15824057b993
Make ibuffer default
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
11
diff
changeset
|
162 ;ibuffer is the only decent one |
15824057b993
Make ibuffer default
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
11
diff
changeset
|
163 (global-set-key (kbd "C-x C-b") 'ibuffer) |
15824057b993
Make ibuffer default
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
11
diff
changeset
|
164 |
11
228001e42997
GUD windows aren't that useful after all, hide them
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
10
diff
changeset
|
165 ;Make GUD put output in a different buffer |
0 | 166 (setq gdb-separate-io t) |
167 | |
5
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
168 ;; Highlight "FIXME: and TODO:" |
0 | 169 (font-lock-add-keywords |
170 'c-mode | |
171 '(("\\<\\(FIXME\\)" 1 font-lock-warning-face t))) | |
172 | |
173 (font-lock-add-keywords | |
174 'c++-mode | |
175 '(("\\<\\(FIXME\\):" 1 font-lock-warning-face t))) | |
176 | |
5
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
177 (font-lock-add-keywords |
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
178 'c-mode |
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
179 '(("\\<\\(TODO\\):" 1 font-lock-warning-face t))) |
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
180 |
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
181 (font-lock-add-keywords |
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
182 'c++-mode |
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
183 '(("\\<\\(TODO\\):" 1 font-lock-warning-face t))) |
317bd5a17fc2
Highlight TODO: in C and C++ modes, comment out ipython for now
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
2
diff
changeset
|
184 |
0 | 185 ;; Let auto-fill end lines with a full stop. |
186 (setq sentence-end-double-space nil) | |
187 | |
188 ;; Don't scroll off horizontally when splitting windows vertically. | |
189 (setq truncate-partial-width-windows nil) | |
190 | |
191 ;; Don't let ediff open a new frame | |
192 (setq ediff-window-setup-function 'ediff-setup-windows-plain) | |
193 | |
19
54767f6d121e
Disable electric mode in C-derived modes
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
18
diff
changeset
|
194 ;; Don't like stuff to indent when I don't hit <TAB> |
54767f6d121e
Disable electric mode in C-derived modes
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
18
diff
changeset
|
195 (add-hook 'c-mode-common-hook (lambda() (setq c-electric-flag nil))) |
54767f6d121e
Disable electric mode in C-derived modes
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
18
diff
changeset
|
196 |
0 | 197 ;; Menus are for wimps |
2
2194965b6dab
Fix removal of menu bar
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
1
diff
changeset
|
198 (menu-bar-mode -1) |
0 | 199 |
200 ;; ;; Use plain tabs in text mode | |
201 ;; (add-hook 'text-mode-hook | |
202 ;; (lambda () (define-key | |
203 ;; text-mode-map (kbd "TAB") | |
204 ;; (lambda () | |
205 ;; (interactive) | |
206 ;; (let ((was-at-bol (bolp))) | |
207 ;; (save-excursion | |
208 ;; (goto-char (point-at-bol)) | |
209 ;; (insert " ")) | |
210 ;; (when was-at-bol | |
211 ;; (back-to-indentation ))))))) | |
212 | |
213 (put 'narrow-to-region 'disabled nil) | |
214 | |
215 ;;; Inserts a relative pathname interactively | |
216 (defun insert-relative-path (path) | |
217 (interactive (list (read-file-name "Path to insert relatively: "))) | |
218 (insert (file-relative-name path default-directory)) | |
219 ) | |
220 | |
221 ; Add cmake listfile names to the mode list. | |
222 (setq auto-mode-alist | |
23
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
223 (append |
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
224 '(("CMakeLists\\.txt\\'" . cmake-mode)) |
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
225 '(("\\.cmake\\'" . cmake-mode)) |
3488f4f3a2b5
Add rainbow-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
21
diff
changeset
|
226 auto-mode-alist)) |
0 | 227 |
228 (defun set-tab-width (width) | |
229 (interactive "nSet tab width: ") | |
230 (setq tab-width width)) | |
231 | |
232 ;; "Fix" the horrible asn1-mode mess | |
233 (add-hook 'asn1-mode-hook | |
234 (lambda () | |
235 (setq indent-line-function #'indent-relative) | |
236 (setq case-fold-search t))) | |
20
d8cde0480aec
Add django and legalese modes
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
19
diff
changeset
|
237 |
29
8120e877b58b
Turn on auto-fill for mail-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
28
diff
changeset
|
238 ;; What it says on the tin |
8120e877b58b
Turn on auto-fill for mail-mode
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
28
diff
changeset
|
239 (add-hook 'mail-mode-hook 'turn-on-auto-fill) |