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