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])
10 '(confirm-kill-emacs (quote y-or-n-p))
11 '(cperl-lazy-help-time nil)
12 '(debian-changelog-mailing-address "don@debian.org")
14 '(display-time-24hr-format t)
15 '(display-time-day-and-date t)
16 '(display-time-mode t)
17 '(font-latex-fontify-script nil)
18 '(font-latex-fontify-sectioning (quote color))
19 '(font-latex-script-display (quote (nil)))
20 '(global-auto-revert-mode t)
21 '(global-font-lock-mode t nil (font-lock))
22 '(global-set-key "\347" t)
24 '(iswitchb-prompt-newbuffer nil)
25 '(mail-user-agent (quote sendmail-user-agent))
26 '(mutt-alias-file-list (quote ("~/.mutt/aliases" "~/.mail_aliases")))
27 '(post-email-address "don@donarmstrong.com")
28 '(post-kill-quoted-sig nil)
29 '(post-mail-message "mutt\\(ng\\|\\)-[a-z0-9]+-[0-9]+-.*")
30 '(post-uses-fill-mode nil)
31 '(ps-footer-font-size (quote (8 . 10)))
32 '(ps-header-font-size (quote (8 . 10)))
33 '(ps-header-title-font-size (quote (10 . 10)))
34 '(ps-line-number-color "blue")
36 '(ps-print-footer-frame nil)
37 '(ps-print-only-one-header t)
38 '(sentence-end "[.?!][]\"')]*\\($\\| \\| \\)[
40 '(sentence-end-double-space nil)
42 '(tool-bar-mode nil nil (tool-bar))
43 '(user-mail-address "don@donarmstrong.com"))
44 (fset 'perl-mode 'cperl-mode)
45 ;;(load-file "cperl-mode.el")
46 (add-to-list 'load-path '"~/lib/emacs_el/")
47 (add-to-list 'load-path '"~/lib/emacs_el/tiny-tools/tiny")
48 (add-to-list 'load-path '"~/lib/emacs_el/tiny-tools/other")
49 ;;(add-to-list 'Tex-style-path '"~/lib/emacs_el/auctex/")
52 (require 'tinyprocmail)
58 ;;(require 'emacs-wiki)
63 (global-set-key "\C-xp" 'gnuserv-edit)
65 (setq auto-mode-alist (cons '("\.wml$" .
66 (lambda () (html-mode) (auto-fill-mode)))
69 ;; Use c-mode for perl .xs files
70 (add-to-list 'auto-mode-alist '("\\.xs\\'" . c-mode))
71 (add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode))
72 (add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
73 (add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode))
74 (add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode))
76 (add-to-list 'auto-mode-alist '("muttng-[a-z0-9]+-[0-9]+-" . post-mode))
77 (add-to-list 'auto-mode-alist '("muttngrc" . muttrc-mode))
79 (add-to-list 'auto-mode-alist '("mutt-[a-z0-9]+-[0-9]+-" . post-mode))
80 (add-to-list 'auto-mode-alist '("muttrc" . muttrc-mode))
83 (global-unset-key "\M-g")
84 (global-set-key "\M-g" 'goto-line)
86 ;;(autoload 'perl-mode "cperl-mode"
87 ;; "alternate mode for editing Perl programs" t)
89 ;; self-insert-command hack.
90 ;; Without this, "if<SP>" expands to
93 ;; which really should be,
98 ;; cperl-auto-newline t
99 ;; cperl-auto-newline-after-colon t
100 cperl-continued-statement-offset 4
101 cperl-brace-offset -4
102 cperl-label-offset -4
103 cperl-highlight-variables-indiscriminately t
104 cperl-electric-lbrace-space nil
106 (add-hook 'cperl-mode-hook (lambda () (cperl-set-style "PerlStyle")))
110 ;(load-library "php-mode")
112 (setq c-indent-level 8)
113 (setq c-brace-imaginary-offset 0)
114 (setq c-brace-offset -8)
115 (setq c-argdecl-indent 8)
116 (setq c-label-offset -8)
117 (setq c-continued-statement-offset 8)
118 (setq indent-tabs-mode nil)
122 ;; (autoload 'php-mode "php-mode" "PHP editing mode" t)
123 ;; (add-to-list 'auto-mode-alist '("\\.php3?\\'" . php-mode))
124 ;; (add-to-list 'auto-mode-alist '("\\.phtml?\\'" . php-mode))
125 ;; (add-to-list 'auto-mode-alist '("\\.php?\\'" . php-mode))
126 ;; (add-to-list 'auto-mode-alist '("\\.php4?\\'" . php-mode))
128 ;; REFTEX (much enhanced management of cross-ref, labels, etc)
129 ;; http://www.strw.leidenuniv.nl/~dominik/Tools/reftex/
130 (autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t)
131 (autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil)
132 (autoload 'reftex-citation "reftex-cite" "Make citation" nil)
133 (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
134 (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
135 (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
136 (add-hook 'LaTeX-mode-hook 'outline-minor-mode) ; with AUCTeX LaTeX mode
137 (add-hook 'latex-mode-hook 'outline-minor-mode) ; with Emacs latex mode
139 ;; (TeX-add-style-hook
144 ;; (custom-set-variables
145 ;; '(font-latex-user-keyword-classes
148 ;; font-lock-function-name-face 2 (command 1 t))))
151 (require 'font-latex)
152 (add-to-list 'font-latex-match-reference-keywords "fref")
153 (add-to-list 'font-latex-match-reference-keywords "Fref")
154 (add-to-list 'font-latex-match-reference-keywords "citep")
155 (add-to-list 'font-latex-match-reference-keywords "citet")
156 (font-latex-match-reference-make)
157 (add-to-list 'font-latex-match-function-keywords "DLA")
158 (add-to-list 'font-latex-match-function-keywords "RZ")
159 (add-to-list 'font-latex-match-function-keywords "fixme")
160 (add-to-list 'font-latex-match-function-keywords "acs")
161 (add-to-list 'font-latex-match-function-keywords "acsp")
162 (add-to-list 'font-latex-match-function-keywords "ac")
163 (add-to-list 'font-latex-match-function-keywords "acp")
164 (add-to-list 'font-latex-match-function-keywords "acl")
165 (add-to-list 'font-latex-match-function-keywords "aclp")
166 (add-to-list 'font-latex-match-function-keywords "acsu")
167 (add-to-list 'font-latex-match-function-keywords "aclu")
168 (add-to-list 'font-latex-match-function-keywords "acused")
169 (font-latex-match-function-make)
170 (setq TeX-parse-self t)
171 (setq TeX-auto-save t)
172 (setq-default TeX-master nil)
174 (defun insert-date ()
175 "Insert date at point."
177 (insert (format-time-string "%A, %B %e, %Y %k:%M:%S %Z")))
178 (global-set-key "\C-[d" 'insert-date)
180 (defun unfill-paragraph (arg)
181 "Pull this whole paragraph up onto one line."
183 (let ((fill-column 10000))
184 (fill-paragraph arg))
187 ;(iswitchb-default-keybindings)
189 (column-number-mode t)
190 (setq reftex-plug-into-AUCTeX t)
194 (require 'mode-compile)
196 (setq reftex-default-bibliography
199 (defadvice server-process-filter (after post-mode-message first activate)
200 "If the buffer is in post mode, overwrite the server-edit
201 message with a post-save-current-buffer-and-exit message."
202 (if (eq major-mode 'post-mode)
204 (substitute-command-keys "Type \\[describe-mode] for help composing; \\[post-save-current-buffer-and-exit] when done."))))
205 ; This is also needed to see the magic message. Set to a higher
206 ; number if you have a faster computer or read slower than me.
207 '(font-lock-verbose 1000)
208 ;(setq server-temp-file-regexp "mutt\(-\|ng-\)")
209 (add-hook 'server-switch-hook
211 (cond ((string-match "Post" mode-name)
213 set-buffer-file-coding-system 'utf-8
217 (add-hook 'post-mode-hook
221 (fset 'insert-function-documentation
222 [?\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])
223 (global-set-key "\M-f" 'insert-function-documentation)
225 (eval-after-load "lilypond-mode"
227 (load-library "lyqi-mode")
228 (define-key LilyPond-mode-map "\C-cq" 'lyqi-mode)))
230 (autoload 'spamassassin-mode "spamassassin-mode" nil t)
232 (desktop-load-default)
236 ;; custom-set-faces was added by Custom.
237 ;; If you edit it by hand, you could mess it up, so be careful.
238 ;; Your init file should contain only one such instance.
239 ;; If there is more than one, they won't work right.
240 '(menu ((((type x-toolkit)) (:background "black" :foreground "grey90")))))
242 (defun ess-change-directory (path)
243 "Set the current working directory to PATH for both *R* and Emacs."
244 (interactive "DDirectory to change to: ")
246 (when (file-exists-p path)
247 (ess-command (concat "setwd(\"" path "\")\n"))
248 ;; use file-name-as-directory to ensure it has trailing /
249 (setq default-directory (file-name-as-directory path))))
251 (put 'upcase-region 'disabled nil)
253 (put 'downcase-region 'disabled nil)