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

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