Expunge crufty old CVS Id tags.
[profile] / emacs
CommitLineData
502f4699 1;;; -*- mode: emacs-lisp; coding: utf-8 -*-
f617db13 2;;;
f617db13
MW
3;;; Emacs configuration file
4;;;
5;;; (c) 1996-1999 Mark Wooding
6;;;
7
8;;;----- Licensing notice ---------------------------------------------------
9;;;
10;;; This program is free software; you can redistribute it and/or modify
11;;; it under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 2 of the License, or
13;;; (at your option) any later version.
14;;;
15;;; This program is distributed in the hope that it will be useful,
16;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with this program; if not, write to the Free Software
22;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
23
24(setq load-path (nconc load-path (list "~/lib/emacs")))
25(require 'dot-emacs)
26
27;;;----- Some random initialisation -----------------------------------------
28
29(setq mdw-init-window (selected-window))
30
31;; --- Load some other bits of code ---
32
400223a1
MW
33(maybe-autoload 'cc-mode "cc-mode" nil t)
34(maybe-autoload 'rexx-mode "rexx-mode" nil t)
35(maybe-autoload 'cvs-update "pcl-cvs" nil t)
36(maybe-autoload 'debian-changelog-mode "debian-changelog-mode" nil t)
37(maybe-autoload 'git-status "git" nil t)
459c9fb2
MW
38(maybe-autoload 'git-blame-mode "git-blame" nil t)
39(maybe-autoload 'stgit "stgit" nil t)
400223a1
MW
40(and (library-exists-p "vc-git")
41 (not (memq 'GIT vc-handled-backends))
308b0b57 42 (setq vc-handled-backends (cons 'GIT vc-handled-backends)))
400223a1 43(and (library-exists-p "quilt")
c7a8da49 44 (not mdw-fast-startup)
400223a1 45 (load "quilt"))
f617db13 46
c7a8da49 47(trap (or mdw-fast-startup (require 'tex-site)))
f617db13
MW
48
49;; --- Skeleton stuff ---
50
c7a8da49 51(trap (or mdw-fast-startup (require 'skel-init)))
f617db13
MW
52
53;; --- Window system-dependent things ---
54
55(require 'paren)
56(trap (show-paren-mode t))
57(or window-system (menu-bar-mode -1))
58
59;; --- Temporary directory handling ---
60
61(defun mdw-check-dir-exists (dir)
62 (and dir
63 (file-directory-p dir)
64 dir))
65(setq tmpdir (or (mdw-check-dir-exists (getenv "TMPDIR"))
66 (mdw-check-dir-exists (format "/tmp/%s" (user-login-name)))
67 "/tmp"))
68
69;; --- Emacs server behaviour ---
70
71(and window-system
72 (trap (gnuserv-start)
73 (setq server-temp-file-regexp (concat "^" tmpdir "\\|/draft$"))))
74
75;; --- Control backup behaviour ---
76
77(setq backup-by-copying nil)
78(setq backup-by-copying-when-linked t)
79(setq backup-by-copying-when-mismatch t)
80
81;; --- Calculator fiddling ---
82
83(setq calc-settings-file "~/.emacs-calc")
84(load calc-settings-file)
85
86;; ---- Some mail and news configuration ---
87
88(setq mail-from-style 'parens)
89(setq mail-signature t)
90(setq mail-yank-prefix "> ")
91(setq mail-archive-file-name "~/Mail/sent")
92
93(setq rmail-display-summary t)
94(setq rmail-file-name "~/Mail/rmail")
95
f617db13
MW
96;; --- Internationalization twiddling ---
97
98(trap
bc30f5c4 99 ;; Have top-bit-set characters work properly in terminals.
f617db13
MW
100 (let ((im (current-input-mode)))
101 (apply #'set-input-mode
bc30f5c4 102 (nconc (list (nth 0 im) (nth 1 im) 0) (nthcdr 3 im)))))
f617db13
MW
103
104;; --- Don't disable any commands ---
105
106(mapatoms #'(lambda (sym) (put sym 'disabled nil)))
107
108;; --- Split a wide window ---
109
110(mdw-divvy-window)
111
1a4d7e7d
MW
112;; --- Postscript printing ---
113
114(setq ps-paper-type 'a4
115 ps-print-color-p nil
116 ps-landscape-mode t
117 ps-number-of-columns 3
118 ps-font-family 'Courier
b5ffc3eb 119 ps-font-size 4)
1a4d7e7d
MW
120
121;; --- Splash screen stuff ---
122
123(or window-system
124 (setq inhibit-splash-screen t
125 inhibit-startup-message t))
126
f617db13
MW
127;; --- Other goodies ---
128
89a72209 129(trap (resize-minibuffer-mode 1)) ;Make minibuffer grow dynamically
f617db13
MW
130(auto-compression-mode 1) ;Enable automatic compression
131(setq dabbrev-case-replace nil) ;Retain case when completing
132(setq next-line-add-newlines nil) ;Don't add weird newlines
133(setq split-height-threshold 45) ;Reuse windows where sensible
134(setq dired-deletion-confirmer ;Make deletion easier in dired
135 (symbol-function 'y-or-n-p))
136(setq dired-listing-switches "-alF") ;Do `ls -F' things in dired windows
c7a8da49 137(setq wdired-allow-to-change-permissions t)
f617db13
MW
138(setq case-fold-file-names nil) ;Don't translate file names (grr...)
139(setq scroll-step 5) ;Don't scroll too much at a time
140(setq-default fill-column 77) ;I use rather narrow windows
141(setq-default comment-column 40) ;Set a standard comment column
142(setq-default truncate-partial-width-windows nil)
8c521a22 143(setq woman-use-own-frame nil) ;Keep man pages somewhere sensible
f617db13
MW
144(setq diff-switches "-u" ;I like reading unified diffs
145 cvs-diff-flags (list diff-switches))
146(setq echo-keystrokes 10) ;Long delay before keystrokes echo
147(setq ange-ftp-ftp-program-name "pftp") ;Use passive FTP
148(setq find-ls-option ;Build file lists efficiently
149 '("-print0 | xargs -0r ls -ld" . "ld"))
6006518e 150(setq bookmark-save-flag 0) ;Save bookmarks automatically
f617db13 151(setq Info-fontify-maximum-menu-size 60000)
cbffcf2b
MW
152(setq ispell-program-name "aspell"
153 ispell-local-dictionary "en_GB-ize-w_accents"
154 flyspell-default-dictionary "en_GB-ize-w_accents"
689009c0 155 ispell-silently-savep t)
f617db13
MW
156(trap
157 (require 'uniquify)
158 (setq uniquify-buffer-name-style 'post-forward-angle-brackets)
159 (setq uniquify-after-kill-buffer-p t))
160(transient-mark-mode t)
161(trap
162 (tooltip-mode 0)
163 (tool-bar-mode 0))
4ae85887 164(trap (or mdw-fast-startup (global-auto-revert-mode t)))
f617db13
MW
165(setq psgml-html-build-new-buffer nil)
166
f141fe0f
MW
167(setq cltl2-root-url (mdw-config 'cltl-url))
168(setq common-lisp-hyperspec-root (mdw-config 'hyperspec-url))
169
170;;;----- W3 and URL fetching stuff ------------------------------------------
171
45d17e24 172(let ((proxy (mdw-config 'http-proxy)))
f141fe0f
MW
173 (setq url-proxy-services
174 `(("http" . ,proxy)
175 ("ftp" . ,proxy)
176 ("gopher" . ,proxy))))
177(setq url-cookie-untrusted-urls '("."))
852cd5fb 178
a203fba8
MW
179(setq browse-url-browser-function (mdw-good-url-browser)
180 browse-url-mozilla-program "firefox")
9b72460c
MW
181
182(setq w3m-default-display-inline-images t)
183
f141fe0f
MW
184(setq w3-do-incremental-display t
185 w3-use-menus '(file edit view go bookmark options
186 buffers style search emacs nil help)
187 w3-display-inline-image t
188 w3-keybinding 'info)
f617db13
MW
189
190;;;----- Calendar configuration ---------------------------------------------
191
192;; --- Trivial stuff for the sunrise/sunset calculations ---
193
194(setq calendar-latitude 52.2)
195(setq calendar-longitude 0.1)
196(setq calendar-location-name "Cambridge, UK")
197
198;; --- Date format fiddling ---
199
200(setq european-calendar-style t)
201
202(setq diary-date-forms '((day "[-/]" month "[^-/0-9]")
203 (day " *" monthname "[ \t]*\\(\^M\\|\n\\)")
204 (backup day " *" monthname "\\W+\\<[^*0-9]")
205 (day "[-/]" month "[-/]" year "[^0-9]")
206 (day " *" monthname " *" year "[^0-9]")
207 (year "[-/]" month "[-/]" day "[^0-9]")
208 (dayname "\\W")))
209
210;; --- Fancy diary handling ---
211
212(add-hook 'diary-display-hook 'fancy-diary-display)
213(setq diary-list-include-blanks t)
214(add-hook 'list-diary-entries-hook 'sort-diary-entries t)
215(add-hook 'list-diary-entries-hook 'include-other-diary-files)
216(add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
217
218;; --- Appointment management ---
219
220(add-hook 'diary-hook 'appt-make-list)
221(setq appt-issue-message t)
222(setq appt-display-interval 3)
223(setq appt-message-warning-time 10)
224
225;; --- Cosmetic stuff ---
226
227(setq display-time-24hr-format t)
228(display-time)
229(trap
230 (if window-system
231 (let ((view-diary-entries-initially t))
232 (calendar))))
233
234(defvar mdw-black-background t)
235
236;; --- Define more mode hooks for MailCrypt ---
237
238(setq mdw-mc-modes
239 '((mdwmail-mode (encrypt . mdwmail-mc-encrypt)
240 (sign . mdwmail-mc-sign))))
241
242;; --- Load the MailCrypt support ---
243
244(trap
245 (and (string-match "linux" (symbol-name system-type))
c7a8da49 246 (not mdw-fast-startup)
f617db13
MW
247 (progn (require 'mailcrypt-init)
248 (require 'mailcrypt)
249 (setq mc-default-scheme 'mc-scheme-gpg)
250 (setq mc-pgp-user-id "mdw-nsict-pgp")
251 (setq mc-gpg-user-id "mdw-nsict-gpg")
252 (setq mc-modes-alist (append mc-modes-alist mdw-mc-modes))
253 (setq mc-pgp-always-sign t)
254 (setq mc-gpg-always-sign t)
255 (setq mc-always-replace 'never)
256 (setq mc-passwd-timeout 3600)
257 (setq mc-temp-directory tmpdir)
258 (setq mc-modes-alist (append mc-modes-alist mdw-mc-modes))
259 (define-key mc-write-mode-map "\C-c/S" 'mc-sign-region)
260 (define-key mc-write-mode-map "\C-c/E" 'mc-encrypt-region)
261 (add-hook 'text-mode-hook 'mc-install-write-mode))))
262
263;;;----- Other common declarations ------------------------------------------
264
265;; --- Default frame size ---
266
267(setq default-frame-alist
268 (mdw-uniquify-alist
269 '((width . 78)
270 (height . 33)
271 (vertical-scroll-bars . right))
272 (and window-system
273 '((cursor-type . bar)
b5d724dd
MW
274 (cursor-blink . t)
275 (left-fringe . 5)
276 (right-fringe . 5)
277 (scroll-bar-width . 15)))
f617db13
MW
278 '((cursor-color . "red"))
279 (if mdw-black-background
280 '((background-color . "black")
281 (foreground-color . "white")
282 (background-mode . dark))
283 '((background-mode . light)))
284 (and (eq window-system 'pm)
285 '((font . "-os2-System VIO-medium-r-normal--*-40-*-*-m-*-cp850")
286 (menu-font . "8.Helv")
287 (background-color . "lightgrey")))
288 '((transparency . t))
289 default-frame-alist))
290
291;; --- Other frame fiddling ---
292
293(setq frame-title-format '("" invocation-name "@" system-name ": %b"))
294
295;; --- Global keymap changes ---
296
297(trap
298 (windmove-default-keybindings)
299 (setq windmove-wrap-around t))
300(trap (iswitchb-mode))
b5d724dd 301(global-set-key "\M-#" 'calc-dispatch)
f617db13
MW
302(global-set-key [f4] 'query-replace-regexp)
303(global-set-key [f5] 'goto-line)
304(global-set-key [f6] 'auto-fill-mode)
305(global-set-key [f7] 'occur)
306(global-set-key [f8] 'undo)
307(global-set-key [f9] 'mdw-divvy-window)
308(global-set-key [insertchar] 'overwrite-mode)
309(global-set-key "\C-xm" 'vm-mail)
310(global-set-key "\C-x\C-n" 'skel-create-file)
311(global-set-key "\C-x4n" 'skel-create-file-other-window)
312(global-set-key "\C-x5n" 'skel-create-file-other-frame)
313(global-set-key [delete] 'delete-char)
314(global-set-key "\C-[\C-m" 'call-last-kbd-macro)
315(global-set-key "\M-q" 'mdw-fill-paragraph)
316(global-set-key "\C-h\C-m" 'manual-entry)
317(global-set-key [mode-line C-mouse-1] 'mouse-tear-off-window)
318(global-set-key [vertical-scroll-bar C-down-mouse-1]
319 'mouse-drag-vertical-line)
320(global-set-key [vertical-scroll-bar C-mouse-1]
321 #'(lambda () (interactive)))
322(global-set-key [mouse-4] 'mdw-wheel-up)
323(global-set-key [mouse-5] 'mdw-wheel-down)
324
325;; --- Recognising types of files ---
326
327(setq auto-mode-alist
328 (append `(("\\.p[lm]$" . perl-mode)
329 ("\\.m$" . objc-mode)
330 ("\\.mxd$" . c-mode)
e808c1e5 331 ("\\.cs" . csharp-mode)
f617db13
MW
332 ;; ("/[ch]/" . c-mode)
333 (,(concat "/\\("
334 "\\.stgit\\.msg" "\\|"
335 "\\.git/COMMIT_EDITMSG" "\\|"
336 "svn-commit\\.tmp" "\\|"
337 "svk-commit[^/.]*\\.tmp"
338 "\\)$")
339 . text-mode)
340 (,(concat "^" tmpdir "/\\("
341 "svk-commit[^/.]*\\.tmp" "\\|"
342 "gitci\\.[^/.]*" "\\|"
343 "cvs[^/.]\\{6\\}" "\\|"
400223a1 344 "quilt_header\.[^/.]\\{6\\}"
f617db13
MW
345 "\\)$")
346 . text-mode)
347 ("\\.calc?$" . apcalc-mode)
348 ("/src/linux/.*\\.\\(c\\|h\\|cc\\)$" . linux-c-mode)
349 ("/\\(s\\|sh\\)/" . arm-assembler-mode)
350 ("\\.\\(cmd\\|exec\\|rexx\\)$" . rexx-mode)
351 ("\\.st$" . smalltalk-mode)
1e52f579
MW
352 ("\\.msgs$" . messages-mode)
353 ("/all-cmds\\.in$" . cpp-messages-mode)
f617db13
MW
354 ("\\.\\(tex\\|dtx\\)$" . latex-mode)
355 ("\\.gc$" . haskell.-mode)
356 (,(concat "^" (getenv "HOME") "/News/") . mdwmail-mode)
357 (,(concat "^" tmpdir "/\\(SLRN\\|snd\\|pico\\)")
358 . mdwmail-mode))
359 auto-mode-alist))
360
27cb4215
MW
361(setq interpreter-mode-alist
362 (append `(("runlisp" . lisp-mode))
363 interpreter-mode-alist))
364
f617db13
MW
365(setq completion-ignored-extensions
366 (append `(".hc" ".hi") completion-ignored-extensions))
367
368;; --- Some common local definitions ---
369
370(make-variable-buffer-local 'mdw-auto-indent)
371
372(mapcar (lambda (hook) (add-hook hook 'mdw-misc-mode-config))
373 '(c-mode-hook c++-mode-hook objc-mode-hook java-mode-hook
374 perl-mode-hook cperl-mode-hook python-mode-hook awk-mode-hook
30c8a8fb 375 tcl-mode-hook asm-mode-hook
f617db13
MW
376 TeX-mode-hook LaTeX-mode-hook TeXinfo-mode-hook
377 tex-mode-hook latex-mode-hook texinfo-mode-hook
378 emacs-lisp-mode-hook scheme-mode-hook
379 lisp-mode-hook lisp-interaction-mode-hook inferior-lisp-mode-hook
380 slime-repl-mode-hook
381 sml-mode-hook haskell-mode-hook
382 smalltalk-mode-hook rexx-mode-hook
383 arm-assembler-mode-hook))
384
385(global-font-lock-mode t)
386(defalias 'perl-mode 'cperl-mode)
387
388;;;----- Rootly editingness -------------------------------------------------
389
390(eval-after-load "tramp"
391 '(progn
392 (setq tramp-methods
393 (mdw-uniquify-alist
394 `(("become"
395 (tramp-connection-function tramp-open-connection-su)
396 (tramp-remote-sh "/bin/sh")
397 (tramp-login-program "become")
398 (tramp-copy-program nil)
399 (tramp-copy-args nil)
400 (tramp-copy-keep-date-arg nil)
401 (tramp-login-args ("TERM=dumb" "%u")))
402 ("really"
403 (tramp-connection-function tramp-open-connection-su)
404 (tramp-login-program "really")
405 (tramp-login-args ("-u" "%u" "--"
406 "env" "TERM=dumb" "/bin/sh"))
407 (tramp-copy-program nil)
408 (tramp-copy-args nil)
409 (tramp-copy-keep-date-arg nil)
410 (tramp-remote-sh "/bin/sh"))
411 ,@tramp-methods)))
412 (setq tramp-multi-connection-function-alist
413 (mdw-uniquify-alist
414 '(("bc" tramp-multi-connect-su "become TERM=dumb %u%n"))
415 '(("r" tramp-multi-connect-su "really -u %u%n"))
416 tramp-multi-connection-function-alist))
417 (setq tramp-default-method "ssh")
418 (setq tramp-default-method-alist
419 `(("\\`localhost\\'" ""
420 ,(cond ((executable-find "become") "become")
421 ((executable-find "really") "really")
422 (t "su")))))))
423
424;;;----- General fontification ----------------------------------------------
425
426;; --- Configure lazy fontification ---
427
f29cc9b2
MW
428(and (fboundp 'lazy-lock-mode)
429 (setq font-lock-support-mode 'lazy-lock-mode))
f617db13
MW
430; (setq lazy-lock-defer-contextually t)
431(setq lazy-lock-defer-time nil)
432(setq font-lock-maximum-decoration 3)
433(setq lazy-lock-minimum-size 0)
434(setq lazy-lock-stealth-time 5)
435(setq lazy-lock-stealth-lines 100)
436(setq lazy-lock-stealth-verbose t)
437
438(add-hook 'after-make-frame-functions 'mdw-do-set-font)
439(add-hook 'term-setup-hook (lambda () (mdw-do-set-font (selected-frame))))
440(add-hook 'window-setup-hook (lambda () (mdw-do-set-font (selected-frame))))
441
442(add-hook 'c-mode-hook 'mdw-fontify-c-and-c++ t)
443(add-hook 'objc-mode-hook 'mdw-fontify-c-and-c++ t)
444(add-hook 'c++-mode-hook 'mdw-fontify-c-and-c++ t)
445(add-hook 'linux-c-mode-hook #'(lambda () (setq c-basic-offset 8)))
30c8a8fb 446(add-hook 'asm-mode-hook 'mdw-fontify-asm t)
f617db13
MW
447
448(add-hook 'apcalc-mode-hook 'mdw-misc-mode-config t)
449(add-hook 'apcalc-mode-hook 'mdw-fontify-apcalc t)
450
451(add-hook 'java-mode-hook 'mdw-fontify-java t)
452
453(add-hook 'awk-mode-hook 'mdw-fontify-awk t)
454
455(add-hook 'perl-mode-hook 'mdw-fontify-perl t)
456(add-hook 'cperl-mode-hook 'mdw-fontify-perl t)
457
458(setq-default py-indent-offset 2)
459(add-hook 'python-mode-hook 'mdw-fontify-python t)
460
461(setq-default tcl-indent-level 2)
462(add-hook 'tcl-mode-hook 'mdw-fontify-tcl t)
463
464(add-hook 'rexx-mode-hook 'mdw-fontify-rexx t)
465
466(setq sml-nested-if-indent t)
467(setq sml-case-indent nil)
468(setq sml-indent-level 4)
469(setq sml-type-of-indent nil)
470(add-hook 'sml-mode-hook 'mdw-fontify-sml t)
471
472(add-hook 'haskell-mode-hook 'mdw-fontify-haskell t)
473(setq-default haskell-indent-offset 2)
474
475(add-hook 'texinfo-mode-hook 'mdw-fontify-texinfo t)
476(add-hook 'TeXinfo-mode-hook 'mdw-fontify-texinfo t)
477
478(setq LaTeX-table-label "tbl:")
479(setq-default TeX-master nil)
480;; (setq TeX-parse-self t)
481;; (setq TeX-auto-save t)
482(setq TeX-auto-untabify nil)
483(add-hook 'TeX-mode-hook 'mdw-fontify-tex t)
484(add-hook 'tex-mode-hook 'mdw-fontify-tex t)
485(add-hook 'LaTeX-mode-hook 'mdw-fontify-tex t)
486(add-hook 'latex-mode-hook 'mdw-fontify-tex t)
487
488(add-hook 'sh-mode-hook #'mdw-setup-sh-script-mode)
ec007bea
MW
489(add-hook 'autoconf-mode-hook #'mdw-setup-m4)
490(add-hook 'm4-mode-hook #'mdw-setup-m4)
f617db13
MW
491
492(add-hook 'smalltalk-mode-hook 'mdw-fontify-smalltalk t)
493(add-hook 'smalltalk-mode-hook 'mdw-setup-smalltalk t)
494
495(add-hook 'emacs-lisp-mode-hook 'mdw-fontify-lispy t)
496(add-hook 'scheme-mode-hook 'mdw-fontify-lispy t)
497(add-hook 'lisp-mode-hook 'mdw-fontify-lispy t)
498(add-hook 'inferior-lisp-mode-hook 'mdw-fontify-lispy t)
499(add-hook 'lisp-interaction-mode-hook 'mdw-fontify-lispy t)
500(add-hook 'slime-repl-mode-hook 'mdw-fontify-lispy t)
501(add-hook 'lisp-mode-hook 'mdw-common-lisp-indent t)
801a881a 502(trap
c7a8da49
MW
503 (if (not mdw-fast-startup)
504 (progn
505 (require 'slime-autoloads)
506 (slime-setup '(slime-autodoc)))))
f617db13
MW
507(add-hook 'inferior-lisp-mode-hook
508 #'(lambda ()
509 (local-set-key "\C-m" 'comint-send-and-indent)) t)
510
511(add-hook 'text-mode-hook 'mdw-text-mode t)
512
e9955c63
MW
513;;;----- TeX stuff ----------------------------------------------------------
514
515(setq TeX-output-view-style
516 '(("^dvi$"
517 ("^landscape$" "^pstricks$\\|^pst-\\|^psfrag$")
518 "%(o?)dvips -t landscape %d -o && evince %f")
519 ("^dvi$" "^pstricks$\\|^pst-\\|^psfrag$"
520 "%(o?)dvips %d -o && evince %f")
521 ("^dvi$"
522 ("^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$" "^landscape$")
523 "%(o?)xdvi %dS -paper a4r -s 0 %d")
524 ("^dvi$" "^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$"
525 "%(o?)xdvi %dS -paper a4 %d")
526 ("^dvi$"
527 ("^a5\\(?:comb\\|paper\\)$" "^landscape$")
528 "%(o?)xdvi %dS -paper a5r -s 0 %d")
529 ("^dvi$" "^a5\\(?:comb\\|paper\\)$" "%(o?)xdvi %dS -paper a5 %d")
530 ("^dvi$" "^b5paper$" "%(o?)xdvi %dS -paper b5 %d")
531 ("^dvi$" "^letterpaper$" "%(o?)xdvi %dS -paper us %d")
532 ("^dvi$" "^legalpaper$" "%(o?)xdvi %dS -paper legal %d")
533 ("^dvi$" "^executivepaper$" "%(o?)xdvi %dS -paper 7.25x10.5in %d")
534 ("^dvi$" "." "%(o?)xdvi %dS %d")
535 ("^pdf$" "." "evince %o")
536 ("^html?$" "." "netscape %o")))
537
c70671f3
MW
538;;;----- SLIME setup --------------------------------------------------------
539
540(let ((stuff '((cmucl ("cmucl"))
541 (sbcl ("sbcl") :coding-system utf-8-unix)
542 (clisp ("clisp") :coding-system utf-8-unix))))
543 (or (boundp 'slime-lisp-implementations)
544 (setq slime-lisp-implementations nil))
545 (while stuff
546 (let* ((head (car stuff))
547 (found (assq (car head) slime-lisp-implementations)))
548 (setq stuff (cdr stuff))
549 (if found
550 (rplacd found (cdr head))
551 (setq slime-lisp-implementations
552 (cons head slime-lisp-implementations))))))
553(setq slime-default-lisp 'sbcl)
554
f617db13
MW
555;;;----- Shell mode ---------------------------------------------------------
556
557;; --- Make the shell mode aware of my prompt ---
558
502f4699 559(setq shell-prompt-pattern "^[^]#$%>»}\n]*[]#$%>»}] *")
f617db13
MW
560(setq comint-password-prompt-regexp
561 (concat "\\(\\([Oo]ld \\|[Nn]ew \\|[a-zA-Z0-9_]*'s \\|^\\)"
562 "[Pp]assword\\|pass phrase\\):\\s *\\'"))
563
564;; --- Notice passwords, and make C-a work right ---
565
566(add-hook 'shell-mode-hook #'mdw-sh-mode-setup)
567
568(add-hook 'term-mode-hook #'mdw-term-mode-setup)
569
570;;;----- Finishing touches --------------------------------------------------
571
572(trap (select-window mdw-init-window))
573(provide 'emacs-init)
574
f617db13 575;;;----- That's all, folks --------------------------------------------------