[23106] | 1 | ; mh-rmail won't find mh programs by default; tell it where they are. |
---|
| 2 | (setq mh-progs "/usr/bin/" |
---|
| 3 | mh-lib-progs "/usr/lib/debathena-nmh/" |
---|
[24266] | 4 | mh-lib "/etc/nmh/" |
---|
| 5 | ; See bugs[27406] and Trac #478 |
---|
| 6 | mh-send-uses-spost-flag 't) |
---|
[23106] | 7 | |
---|
| 8 | ; Too many users get bit if we don't set this. |
---|
[23439] | 9 | ; We can probably remove this setting once tcsh is gone. |
---|
[23106] | 10 | (setq require-final-newline t) |
---|
| 11 | |
---|
| 12 | ; lpr -d doesn't do anything in the Athena environment; use dvips to print |
---|
| 13 | ; DVI files. |
---|
| 14 | (setq tex-dvi-print-command "dvips") |
---|
| 15 | |
---|
[23107] | 16 | ; Some gnus settings. We set nnmail-crosspost-link-function to |
---|
| 17 | ; 'copy-file because AFS does not support hard links. |
---|
| 18 | (setq gnus-default-nntp-server "news.mit.edu" |
---|
[23106] | 19 | gnus-local-organization "Massachusetts Institute of Technology" |
---|
[23107] | 20 | nnmail-crosspost-link-function 'copy-file) |
---|
[23106] | 21 | |
---|
| 22 | ; Athena auto-save customizations |
---|
| 23 | |
---|
[23107] | 24 | (defconst auto-save-main-directory "/var/tmp/" |
---|
[23106] | 25 | "The root of the auto-save directory; nil means use old style.") |
---|
| 26 | |
---|
| 27 | ; Put .saves files in same place as auto-save files. |
---|
| 28 | (setq auto-save-list-file-prefix (concat auto-save-main-directory ".saves")) |
---|
| 29 | |
---|
| 30 | (defun make-auto-save-file-name () |
---|
| 31 | "Return file name to use for auto-saves of current buffer. |
---|
| 32 | Does not consider auto-save-visited-file-name; that is checked |
---|
| 33 | before calling this function. |
---|
| 34 | You can redefine this for customization. |
---|
| 35 | See also auto-save-file-name-p." |
---|
| 36 | (if auto-save-main-directory |
---|
| 37 | (if buffer-file-name |
---|
| 38 | (concat auto-save-main-directory |
---|
| 39 | "#" |
---|
| 40 | (int-to-string (user-real-uid)) |
---|
| 41 | "." |
---|
| 42 | (auto-save-replace-slashes buffer-file-name) |
---|
| 43 | "#") |
---|
| 44 | (concat auto-save-main-directory |
---|
| 45 | "#%" |
---|
| 46 | (int-to-string (user-real-uid)) |
---|
| 47 | "." |
---|
| 48 | (auto-save-replace-slashes (buffer-name)) |
---|
| 49 | "#")) |
---|
| 50 | (if buffer-file-name |
---|
| 51 | (concat (file-name-directory buffer-file-name) |
---|
| 52 | "#" |
---|
| 53 | (file-name-nondirectory buffer-file-name) |
---|
| 54 | "#") |
---|
| 55 | (expand-file-name (concat "#%" (buffer-name) "#"))))) |
---|
| 56 | |
---|
| 57 | (defun auto-save-replace-slashes (name) |
---|
| 58 | "Replace all slashes in NAME with bangs." |
---|
| 59 | (let ((pos 0) (len (length name))) |
---|
| 60 | (setq ourname (make-string len ? )) |
---|
| 61 | (while (< pos len) |
---|
| 62 | (if (= (aref name pos) ?/) |
---|
| 63 | (aset ourname pos ?@) |
---|
| 64 | (aset ourname pos (aref name pos))) |
---|
| 65 | (setq pos (+ 1 pos))) |
---|
| 66 | ourname)) |
---|