]> git.donarmstrong.com Git - home-base.git/blob - .emacs
update merge r115:HEAD changes
[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-day-and-date t)
14  '(display-time-mode t nil (time))
15  '(global-auto-revert-mode t nil (autorevert))
16  '(global-font-lock-mode t nil (font-lock))
17  '(iswitchb-prompt-newbuffer nil)
18  '(mail-user-agent (quote sendmail-user-agent))
19  '(mutt-alias-file-list (quote ("~/.mutt/aliases" "~/.mail_aliases")))
20  '(post-email-address "don@donarmstrong.com")
21  '(post-kill-quoted-sig nil)
22  '(post-mail-message "mutt\\(ng\\|\\)-[a-z0-9]+-[0-9]+-.*")
23  '(post-uses-fill-mode nil)
24  '(ps-footer-font-size (quote (8 . 10)))
25  '(ps-header-font-size (quote (8 . 10)))
26  '(ps-header-title-font-size (quote (10 . 10)))
27  '(ps-line-number-color "blue")
28  '(ps-print-footer t)
29  '(ps-print-footer-frame nil)
30  '(ps-print-only-one-header t)
31  '(sentence-end "[.?!][]\"')]*\\($\\|   \\| \\)[        
32 ]*")
33  '(sentence-end-double-space nil)
34  '(show-paren-mode t nil (paren))
35  '(tool-bar-mode nil nil (tool-bar))
36  '(user-mail-address "don@donarmstrong.com"))
37 (fset 'perl-mode 'cperl-mode)
38 ;;(load-file "cperl-mode.el")
39 (add-to-list 'load-path '"~/lib/emacs_el/")
40
41 (require 'tex-site)
42 (require 'psvn)
43 (require 'cperl-mode)
44 ;;(require 'ecasound)
45 ;;(require 'emacs-wiki)
46 (require 'bibtex)
47 (require 'post)
48
49
50 (global-set-key "\C-xp" 'gnuserv-edit)
51
52 (setq auto-mode-alist (cons '("\.wml$" . 
53                               (lambda () (html-mode) (auto-fill-mode)))
54                             auto-mode-alist))
55
56 ;; Use c-mode for perl .xs files
57 (add-to-list 'auto-mode-alist '("\\.xs\\'" . c-mode))
58 (add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode))
59 (add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
60 (add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode))
61 (add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode))
62
63 (add-to-list 'auto-mode-alist '("muttng-[a-z0-9]+-[0-9]+-" . post-mode))
64 (add-to-list 'auto-mode-alist '("muttngrc" . muttrc-mode))
65
66
67
68 ;;(autoload 'perl-mode "cperl-mode"
69 ;;  "alternate mode for editing Perl programs" t)
70
71 ;; self-insert-command hack.
72 ;;   Without this, "if<SP>" expands to
73 ;;   if ( -!-) {
74 ;;   }
75 ;;   which really should be,
76 ;;   if (-!-) {
77 ;;   }
78 (setq cperl-hairy t
79       cperl-indent-level 4
80 ;;      cperl-auto-newline t
81 ;;      cperl-auto-newline-after-colon t
82       cperl-continued-statement-offset 4
83       cperl-brace-offset -4
84       cperl-label-offset -4
85       cperl-highlight-variables-indiscriminately t
86       cperl-electric-lbrace-space nil
87       )
88 (add-hook 'cperl-mode-hook (lambda () (cperl-set-style "K&R")))
89
90
91
92 (load-library "php-mode")
93
94 (setq c-indent-level 8)
95 (setq c-brace-imaginary-offset 0)
96 (setq c-brace-offset -8)
97 (setq c-argdecl-indent 8)
98 (setq c-label-offset -8)
99 (setq c-continued-statement-offset 8)
100 (setq indent-tabs-mode nil)
101 (setq tab-width 8)
102
103
104 ;; (autoload 'php-mode "php-mode" "PHP editing mode" t)
105 ;; (add-to-list 'auto-mode-alist '("\\.php3?\\'" . php-mode))
106 ;; (add-to-list 'auto-mode-alist '("\\.phtml?\\'" . php-mode))
107 ;; (add-to-list 'auto-mode-alist '("\\.php?\\'" . php-mode))
108 ;; (add-to-list 'auto-mode-alist '("\\.php4?\\'" . php-mode))
109
110 (custom-set-faces
111   ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
112   ;; Your init file should contain only one such instance.
113  )
114
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
128
129
130 (defun insert-date ()
131   "Insert date at point."
132   (interactive)
133   (insert (format-time-string "%A, %B %e, %Y %k:%M:%S %Z")))
134 (global-set-key "\C-[d" 'insert-date)
135
136 ;(iswitchb-default-keybindings)
137
138 (column-number-mode t)
139 (setq reftex-plug-into-AUCTeX t)
140
141 (gnuserv-start)
142
143 (require 'mode-compile)
144
145 (defadvice server-process-filter (after post-mode-message first activate)
146   "If the buffer is in post mode, overwrite the server-edit
147     message with a post-save-current-buffer-and-exit message."
148   (if (eq major-mode 'post-mode)
149       (message
150        (substitute-command-keys "Type \\[describe-mode] for help composing; \\[post-save-current-buffer-and-exit] when done."))))
151                                         ; This is also needed to see the magic message.  Set to a higher
152                                         ; number if you have a faster computer or read slower than me.
153 '(font-lock-verbose 1000)
154 ;(setq server-temp-file-regexp "mutt\(-\|ng-\)")
155 (add-hook 'server-switch-hook 
156           (function (lambda()
157                       (cond ((string-match "Post" mode-name)
158                              (post-goto-body)))
159                       set-buffer-file-coding-system 'utf-8
160                       )))
161
162
163 (add-hook 'post-mode-hook
164           (auto-fill-mode nil)
165           )
166
167 (fset 'insert-function-documentation
168    [?\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])
169 (global-set-key "\M-f" 'insert-function-documentation)
170
171 (eval-after-load "lilypond-mode" 
172   '(progn
173      (load-library "lyqi-mode")
174      (define-key LilyPond-mode-map "\C-cq" 'lyqi-mode)))
175
176 (desktop-load-default)
177 (desktop-read)