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

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