source: trunk/debathena/config/emacs-config/debian/60debathena.el @ 24569

Revision 24569, 1.9 KB checked in by geofft, 14 years ago (diff)
Move MH-E configuration out of emacs-config
Line 
1; Too many users get bit if we don't set this.
2; We can probably remove this setting once tcsh is gone.
3(setq require-final-newline t)
4
5; lpr -d doesn't do anything in the Athena environment; use dvips to print
6; DVI files.
7(setq tex-dvi-print-command "dvips")
8
9; Some gnus settings.  We set nnmail-crosspost-link-function to
10; 'copy-file because AFS does not support hard links.
11(setq gnus-default-nntp-server "news.mit.edu"
12      gnus-local-organization "Massachusetts Institute of Technology"
13      nnmail-crosspost-link-function 'copy-file)
14
15; Athena auto-save customizations
16
17(defconst auto-save-main-directory "/var/tmp/"
18  "The root of the auto-save directory; nil means use old style.")
19
20; Put .saves files in same place as auto-save files.
21(setq auto-save-list-file-prefix (concat auto-save-main-directory ".saves"))
22
23(defun make-auto-save-file-name ()
24  "Return file name to use for auto-saves of current buffer.
25Does not consider auto-save-visited-file-name; that is checked
26before calling this function.
27You can redefine this for customization.
28See also auto-save-file-name-p."
29  (if auto-save-main-directory
30      (if buffer-file-name
31          (concat auto-save-main-directory
32                  "#"
33                  (int-to-string (user-real-uid))
34                  "."
35                  (auto-save-replace-slashes buffer-file-name)
36                  "#")
37        (concat auto-save-main-directory
38                "#%"
39                (int-to-string (user-real-uid))
40                "."
41                (auto-save-replace-slashes (buffer-name))
42                "#"))
43    (if buffer-file-name
44        (concat (file-name-directory buffer-file-name)
45                "#"
46                (file-name-nondirectory buffer-file-name)
47                "#")
48      (expand-file-name (concat "#%" (buffer-name) "#")))))
49
50(defun auto-save-replace-slashes (name)
51  "Replace all slashes in NAME with bangs."
52  (let ((pos 0) (len (length name)))
53    (setq ourname (make-string len ? ))
54    (while (< pos len)
55      (if (= (aref name pos) ?/)
56          (aset ourname pos ?@)
57        (aset ourname pos (aref name pos)))
58      (setq pos (+ 1 pos)))
59    ourname))
Note: See TracBrowser for help on using the repository browser.