]> git.donarmstrong.com Git - home-base.git/blob - .emacs
* tweak color setting
[home-base.git] / .emacs
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  '(bibtex-user-optional-fields (quote (("annote" "Personal annotation (ignored)") ("abstract" "") ("pmid" "") ("doi" ""))))
7  '(calendar-latitude [33 57 north])
8  '(calendar-longitude [117 24 west])
9  '(case-fold-search t)
10  '(confirm-kill-emacs (quote y-or-n-p))
11  '(cperl-lazy-help-time nil)
12  '(debian-changelog-mailing-address "don@debian.org")
13  '(display-time t)
14  '(display-time-24hr-format t)
15  '(display-time-day-and-date t)
16  '(display-time-mode t)
17  '(global-auto-revert-mode t)
18  '(global-font-lock-mode t nil (font-lock))
19  '(global-set-key "\347" t)
20  '(iswitchb-mode t)
21  '(iswitchb-prompt-newbuffer nil)
22  '(mail-user-agent (quote sendmail-user-agent))
23  '(mutt-alias-file-list (quote ("~/.mutt/aliases" "~/.mail_aliases")))
24  '(post-email-address "don@donarmstrong.com")
25  '(post-kill-quoted-sig nil)
26  '(post-mail-message "mutt\\(ng\\|\\)-[a-z0-9]+-[0-9]+-.*")
27  '(post-uses-fill-mode nil)
28  '(ps-footer-font-size (quote (8 . 10)))
29  '(ps-header-font-size (quote (8 . 10)))
30  '(ps-header-title-font-size (quote (10 . 10)))
31  '(ps-line-number-color "blue")
32  '(ps-print-footer t)
33  '(ps-print-footer-frame nil)
34  '(ps-print-only-one-header t)
35  '(sentence-end "[.?!][]\"')]*\\($\\|   \\| \\)[        
36 ]*")
37  '(sentence-end-double-space nil)
38  '(show-paren-mode t)
39  '(tool-bar-mode nil nil (tool-bar))
40  '(user-mail-address "don@donarmstrong.com"))
41 (fset 'perl-mode 'cperl-mode)
42 ;;(load-file "cperl-mode.el")
43 (add-to-list 'load-path '"~/lib/emacs_el/")
44 ;;(add-to-list 'Tex-style-path '"~/lib/emacs_el/auctex/")
45
46 (require 'tex-site)
47 (require 'psvn)
48 (require 'cperl-mode)
49 ;;(require 'ecasound)
50 ;;(require 'emacs-wiki)
51 (require 'bibtex)
52 (require 'post)
53 ;;(require 'fixme)
54
55 (global-set-key "\C-xp" 'gnuserv-edit)
56
57 (setq auto-mode-alist (cons '("\.wml$" . 
58                               (lambda () (html-mode) (auto-fill-mode)))
59                             auto-mode-alist))
60
61 ;; Use c-mode for perl .xs files
62 (add-to-list 'auto-mode-alist '("\\.xs\\'" . c-mode))
63 (add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode))
64 (add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
65 (add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode))
66 (add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode))
67
68 (add-to-list 'auto-mode-alist '("muttng-[a-z0-9]+-[0-9]+-" . post-mode))
69 (add-to-list 'auto-mode-alist '("muttngrc" . muttrc-mode))
70
71 (global-unset-key "\M-g")
72 (global-set-key "\M-g" 'goto-line)
73
74 ;;(autoload 'perl-mode "cperl-mode"
75 ;;  "alternate mode for editing Perl programs" t)
76
77 ;; self-insert-command hack.
78 ;;   Without this, "if<SP>" expands to
79 ;;   if ( -!-) {
80 ;;   }
81 ;;   which really should be,
82 ;;   if (-!-) {
83 ;;   }
84 (setq cperl-hairy t
85       cperl-indent-level 4
86 ;;      cperl-auto-newline t
87 ;;      cperl-auto-newline-after-colon t
88       cperl-continued-statement-offset 4
89       cperl-brace-offset -4
90       cperl-label-offset -4
91       cperl-highlight-variables-indiscriminately t
92       cperl-electric-lbrace-space nil
93       )
94 (add-hook 'cperl-mode-hook (lambda () (cperl-set-style "K&R")))
95
96
97
98 ;(load-library "php-mode")
99
100 (setq c-indent-level 8)
101 (setq c-brace-imaginary-offset 0)
102 (setq c-brace-offset -8)
103 (setq c-argdecl-indent 8)
104 (setq c-label-offset -8)
105 (setq c-continued-statement-offset 8)
106 (setq indent-tabs-mode nil)
107 (setq tab-width 8)
108
109
110 ;; (autoload 'php-mode "php-mode" "PHP editing mode" t)
111 ;; (add-to-list 'auto-mode-alist '("\\.php3?\\'" . php-mode))
112 ;; (add-to-list 'auto-mode-alist '("\\.phtml?\\'" . php-mode))
113 ;; (add-to-list 'auto-mode-alist '("\\.php?\\'" . php-mode))
114 ;; (add-to-list 'auto-mode-alist '("\\.php4?\\'" . php-mode))
115
116 ;; REFTEX (much enhanced management of cross-ref, labels, etc)
117 ;; http://www.strw.leidenuniv.nl/~dominik/Tools/reftex/
118 (autoload 'reftex-mode     "reftex" "RefTeX Minor Mode" t)
119 (autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" nil)
120 (autoload 'reftex-citation "reftex-cite" "Make citation" nil)
121 (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
122 (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
123 (add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode
124 (add-hook 'LaTeX-mode-hook 'outline-minor-mode)   ; with AUCTeX LaTeX mode
125 (add-hook 'latex-mode-hook 'outline-minor-mode)   ; with Emacs latex mode
126
127 ;; (TeX-add-style-hook
128 ;;  "latex"
129 ;;  (lambda ()
130 ;;    (TeX-add-symbols
131 ;;     '("DLA" 1))))
132 ;; (custom-set-variables
133 ;;  '(font-latex-user-keyword-classes 
134 ;;    '(("fixme" 
135 ;;       ("DLA" "RZ")
136 ;;       font-lock-function-name-face 2 (command 1 t))))
137 ;; ) 
138
139 (require 'font-latex)
140 (add-to-list 'font-latex-match-reference-keywords "fref")
141 (add-to-list 'font-latex-match-reference-keywords "Fref")
142 (add-to-list 'font-latex-match-reference-keywords "citep")
143 (add-to-list 'font-latex-match-reference-keywords "citet")
144 (font-latex-match-reference-make)
145 (add-to-list 'font-latex-match-function-keywords "DLA")
146 (add-to-list 'font-latex-match-function-keywords "RZ")
147 (add-to-list 'font-latex-match-function-keywords "fixme")
148 (add-to-list 'font-latex-match-function-keywords "acs")
149 (add-to-list 'font-latex-match-function-keywords "acsp")
150 (add-to-list 'font-latex-match-function-keywords "ac")
151 (add-to-list 'font-latex-match-function-keywords "acp")
152 (add-to-list 'font-latex-match-function-keywords "acl")
153 (add-to-list 'font-latex-match-function-keywords "aclp")
154 (add-to-list 'font-latex-match-function-keywords "acsu")
155 (add-to-list 'font-latex-match-function-keywords "aclu")
156 (add-to-list 'font-latex-match-function-keywords "acused")
157 (font-latex-match-function-make)
158 (setq TeX-parse-self t)
159 (setq TeX-auto-save t)
160 (setq-default TeX-master nil)
161
162 (defun insert-date ()
163   "Insert date at point."
164   (interactive)
165   (insert (format-time-string "%A, %B %e, %Y %k:%M:%S %Z")))
166 (global-set-key "\C-[d" 'insert-date)
167
168 (defun unfill-paragraph (arg)
169   "Pull this whole paragraph up onto one line."
170   (interactive "*p")
171   (let ((fill-column 10000))
172     (fill-paragraph arg))
173   )
174
175 ;(iswitchb-default-keybindings)
176
177 (column-number-mode t)
178 (setq reftex-plug-into-AUCTeX t)
179
180 (gnuserv-start)
181
182 (require 'mode-compile)
183
184 (defadvice server-process-filter (after post-mode-message first activate)
185   "If the buffer is in post mode, overwrite the server-edit
186     message with a post-save-current-buffer-and-exit message."
187   (if (eq major-mode 'post-mode)
188       (message
189        (substitute-command-keys "Type \\[describe-mode] for help composing; \\[post-save-current-buffer-and-exit] when done."))))
190                                         ; This is also needed to see the magic message.  Set to a higher
191                                         ; number if you have a faster computer or read slower than me.
192 '(font-lock-verbose 1000)
193 ;(setq server-temp-file-regexp "mutt\(-\|ng-\)")
194 (add-hook 'server-switch-hook 
195           (function (lambda()
196                       (cond ((string-match "Post" mode-name)
197                              (post-goto-body)))
198                       set-buffer-file-coding-system 'utf-8
199                       )))
200
201
202 (add-hook 'post-mode-hook
203           (auto-fill-mode nil)
204           )
205
206 (fset 'insert-function-documentation
207    [?\C-x ?i home ?\C-k ?/ ?h ?o ?m ?e ?/ ?d ?o ?n ?/ ?l ?i ?b ?/ ?t ?e ?m ?p ?l ?a ?t ?e ?s ?/ ?p ?e ?r ?l ?_ ?f ?u ?n ?c ?t ?i ?o ?n ?_ ?d ?o ?c ?u ?m ?e ?n ?t ?a ?t ?i ?o ?n return])
208 (global-set-key "\M-f" 'insert-function-documentation)
209
210 (eval-after-load "lilypond-mode" 
211   '(progn
212      (load-library "lyqi-mode")
213      (define-key LilyPond-mode-map "\C-cq" 'lyqi-mode)))
214
215 (desktop-load-default)
216 (desktop-read)
217 '(iswitchb-mode on)
218 (custom-set-faces
219   ;; custom-set-faces was added by Custom.
220   ;; If you edit it by hand, you could mess it up, so be careful.
221   ;; Your init file should contain only one such instance.
222   ;; If there is more than one, they won't work right.
223  )
224
225 (put 'upcase-region 'disabled nil)
226
227 (put 'downcase-region 'disabled nil)