]> git.donarmstrong.com Git - home-base.git/blob - .emacs
moved everything into trunk
[home-base.git] / .emacs
1 (custom-set-variables
2   ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
3   ;; Your init file should contain only one such instance.
4  '(bibtex-user-optional-fields (quote (("annote" "Personal annotation (ignored)") ("abstract" "") ("pmid" "") ("doi" ""))))
5  '(calendar-latitude [33 57 north] t)
6  '(calendar-longitude [117 24 west] t)
7  '(case-fold-search t)
8  '(confirm-kill-emacs (quote y-or-n-p))
9  '(cperl-lazy-help-time nil)
10  '(debian-changelog-mailing-address "don@debian.org")
11  '(display-time t)
12  '(display-time-24hr-format t)
13  '(display-time-mode t nil (time))
14  '(global-auto-revert-mode t nil (autorevert))
15  '(global-font-lock-mode t nil (font-lock))
16  '(iswitchb-prompt-newbuffer nil)
17  '(mail-user-agent (quote sendmail-user-agent))
18  '(mutt-alias-file-list (quote ("~/.mutt/aliases" "~/.mail_aliases")))
19  '(post-email-address "don@donarmstrong.com")
20  '(post-kill-quoted-sig nil)
21  '(post-mail-message "mutt\\(ng\\|\\)-[a-z0-9]+-[0-9]+-.*")
22  '(post-uses-fill-mode nil)
23  '(ps-footer-font-size (quote (8 . 10)))
24  '(ps-header-font-size (quote (8 . 10)))
25  '(ps-header-title-font-size (quote (10 . 10)))
26  '(ps-line-number-color "blue")
27  '(ps-print-footer t)
28  '(ps-print-footer-frame nil)
29  '(ps-print-only-one-header t)
30  '(sentence-end "[.?!][]\"')]*\\($\\|   \\| \\)[        
31 ]*")
32  '(sentence-end-double-space nil)
33  '(show-paren-mode t nil (paren))
34  '(tool-bar-mode nil nil (tool-bar))
35  '(user-mail-address "don@donarmstrong.com"))
36 (fset 'perl-mode 'cperl-mode)
37 ;;(load-file "cperl-mode.el")
38 (add-to-list 'load-path '"~/emacs_el/")
39
40 (require 'tex-site)
41 (require 'psvn)
42 (require 'cperl-mode)
43 ;;(require 'ecasound)
44 (require 'bibtex)
45 (require 'post)
46
47
48 (global-set-key "\C-xp" 'gnuserv-edit)
49
50 (setq auto-mode-alist (cons '("\.wml$" . 
51                               (lambda () (html-mode) (auto-fill-mode)))
52                             auto-mode-alist))
53
54 ;; Use c-mode for perl .xs files
55 (add-to-list 'auto-mode-alist '("\\.xs\\'" . c-mode))
56 (add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode))
57 (add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
58 (add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode))
59 (add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode))
60
61 (add-to-list 'auto-mode-alist '("muttng-[a-z0-9]+-[0-9]+-" . post-mode))
62 (add-to-list 'auto-mode-alist '("muttngrc" . muttrc-mode))
63
64
65
66 ;;(autoload 'perl-mode "cperl-mode"
67 ;;  "alternate mode for editing Perl programs" t)
68
69 ;; self-insert-command hack.
70 ;;   Without this, "if<SP>" expands to
71 ;;   if ( -!-) {
72 ;;   }
73 ;;   which really should be,
74 ;;   if (-!-) {
75 ;;   }
76 (setq cperl-hairy t
77       cperl-indent-level 4
78 ;;      cperl-auto-newline t
79 ;;      cperl-auto-newline-after-colon t
80       cperl-continued-statement-offset 4
81       cperl-brace-offset -4
82       cperl-label-offset -4
83       cperl-highlight-variables-indiscriminately t
84       cperl-electric-lbrace-space nil
85       )
86 (add-hook 'cperl-mode-hook (lambda () (cperl-set-style "K&R")))
87
88
89
90 (load-library "php-mode")
91
92 (setq c-indent-level 8)
93 (setq c-brace-imaginary-offset 0)
94 (setq c-brace-offset -8)
95 (setq c-argdecl-indent 8)
96 (setq c-label-offset -8)
97 (setq c-continued-statement-offset 8)
98 (setq indent-tabs-mode nil)
99 (setq tab-width 8)
100
101
102 ;; (autoload 'php-mode "php-mode" "PHP editing mode" t)
103 ;; (add-to-list 'auto-mode-alist '("\\.php3?\\'" . php-mode))
104 ;; (add-to-list 'auto-mode-alist '("\\.phtml?\\'" . php-mode))
105 ;; (add-to-list 'auto-mode-alist '("\\.php?\\'" . php-mode))
106 ;; (add-to-list 'auto-mode-alist '("\\.php4?\\'" . php-mode))
107
108 (custom-set-faces
109   ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
110   ;; Your init file should contain only one such instance.
111  )
112
113
114 ;; REFTEX (much enhanced management of cross-ref, labels, etc)
115 ;; http://www.strw.leidenuniv.nl/~dominik/Tools/reftex/
116 (autoload 'reftex-mode     "reftex" "RefTeX Minor Mode" t)
117 (autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" nil)
118 (autoload 'reftex-citation "reftex-cite" "Make citation" nil)
119 (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
120 (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
121 (add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode
122 (add-hook 'LaTeX-mode-hook 'outline-minor-mode)   ; with AUCTeX LaTeX mode
123 (add-hook 'latex-mode-hook 'outline-minor-mode)   ; with Emacs latex mode
124
125
126
127
128 (defun insert-date ()
129   "Insert date at point."
130   (interactive)
131   (insert (format-time-string "%A, %B %e, %Y %k:%M:%S %Z")))
132 (global-set-key "\C-[d" 'insert-date)
133
134 (iswitchb-default-keybindings)
135
136 (column-number-mode t)
137 (setq reftex-plug-into-AUCTeX t)
138
139 (gnuserv-start)
140
141 (require 'mode-compile)
142
143 (defadvice server-process-filter (after post-mode-message first activate)
144   "If the buffer is in post mode, overwrite the server-edit
145     message with a post-save-current-buffer-and-exit message."
146   (if (eq major-mode 'post-mode)
147       (message
148        (substitute-command-keys "Type \\[describe-mode] for help composing; \\[post-save-current-buffer-and-exit] when done."))))
149                                         ; This is also needed to see the magic message.  Set to a higher
150                                         ; number if you have a faster computer or read slower than me.
151 '(font-lock-verbose 1000)
152 ;(setq server-temp-file-regexp "mutt\(-\|ng-\)")
153 (add-hook 'server-switch-hook 
154           (function (lambda()
155                       (cond ((string-match "Post" mode-name)
156                              (post-goto-body)))
157                       set-buffer-file-coding-system 'utf-8
158                       )))
159
160
161 (add-hook 'post-mode-hook
162           (auto-fill-mode nil)
163           )
164
165 (fset 'insert-function-documentation
166    [?\C-x ?i home ?\C-k ?/ ?h ?o ?m ?e ?/ ?d ?o ?n ?/ ?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])
167 (global-set-key "\M-f" 'insert-function-documentation)
168      
169
170 (desktop-load-default)
171 (desktop-read)