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

Revision 23107, 2.9 KB checked in by ghudson, 16 years ago (diff)
In emacs-config: * Prune heavily.
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; Security measure.
7(setq inhibit-local-variables t)
8
9; Too many users get bit if we don't set this.
10(setq require-final-newline t)
11
12; Handle bug reports locally.
13(setq bug-gnu-emacs "bugs@mit.edu")
14
15; Force outgoing mail domain to be "mit.edu" instead of local machine name.
16(setq mail-host-address "mit.edu")
17
18; lpr -d doesn't do anything in the Athena environment; use dvips to print
19; DVI files.
20(setq tex-dvi-print-command "dvips")
21
22; Athena likes different X paste behavior
23(setq mouse-yank-at-point t)
24
25; Cosmetic change, preferred by most users as far as we know.  (And
26; consistent with gnome-terminal, xterm, etc.)
27(blink-cursor-mode 0)
28
29; Change the initial scratch buffer to avoid people losing text they
30; erroneously type into it.  Also make it a text buffer instead of a
31; lisp buffer.
32(setq initial-major-mode '(lambda ()
33                            (text-mode)
34                            (auto-fill-mode 1)
35                            (setq buffer-offer-save t)))
36; compensate for the above
37(setq initial-scratch-message "\
38This buffer is for notes you don't want to save.  If you want to create
39a file, visit that file with C-x C-f, then enter the text in that file's
40own buffer.
41
42")
43
44; Some gnus settings.  We set nnmail-crosspost-link-function to
45; 'copy-file because AFS does not support hard links.
46(setq gnus-default-nntp-server "news.mit.edu"
47      gnus-local-organization "Massachusetts Institute of Technology"
48      nnmail-crosspost-link-function 'copy-file)
49
50; Athena auto-save customizations
51
52(defconst auto-save-main-directory "/var/tmp/"
53  "The root of the auto-save directory; nil means use old style.")
54
55; Put .saves files in same place as auto-save files.
56(setq auto-save-list-file-prefix (concat auto-save-main-directory ".saves"))
57
58(defun make-auto-save-file-name ()
59  "Return file name to use for auto-saves of current buffer.
60Does not consider auto-save-visited-file-name; that is checked
61before calling this function.
62You can redefine this for customization.
63See also auto-save-file-name-p."
64  (if auto-save-main-directory
65      (if buffer-file-name
66          (concat auto-save-main-directory
67                  "#"
68                  (int-to-string (user-real-uid))
69                  "."
70                  (auto-save-replace-slashes buffer-file-name)
71                  "#")
72        (concat auto-save-main-directory
73                "#%"
74                (int-to-string (user-real-uid))
75                "."
76                (auto-save-replace-slashes (buffer-name))
77                "#"))
78    (if buffer-file-name
79        (concat (file-name-directory buffer-file-name)
80                "#"
81                (file-name-nondirectory buffer-file-name)
82                "#")
83      (expand-file-name (concat "#%" (buffer-name) "#")))))
84
85(defun auto-save-replace-slashes (name)
86  "Replace all slashes in NAME with bangs."
87  (let ((pos 0) (len (length name)))
88    (setq ourname (make-string len ? ))
89    (while (< pos len)
90      (if (= (aref name pos) ?/)
91          (aset ourname pos ?@)
92        (aset ourname pos (aref name pos)))
93      (setq pos (+ 1 pos)))
94    ourname))
Note: See TracBrowser for help on using the repository browser.