0
|
1 ;;; paths.el --- define pathnames for use by various Emacs commands.
|
|
2
|
|
3 ;; Copyright (C) 1986, 1988, 1993, 1994 Free Software Foundation, Inc.
|
|
4
|
|
5 ;; Maintainer: FSF
|
|
6 ;; Keywords: internal
|
|
7
|
|
8 ;; This file is part of XEmacs.
|
|
9
|
|
10 ;; XEmacs is free software; you can redistribute it and/or modify it
|
|
11 ;; under the terms of the GNU General Public License as published by
|
|
12 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
13 ;; any later version.
|
|
14
|
|
15 ;; XEmacs is distributed in the hope that it will be useful, but
|
|
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
18 ;; General Public License for more details.
|
|
19
|
|
20 ;; You should have received a copy of the GNU General Public License
|
|
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free
|
|
22 ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
23
|
|
24 ;;; Synched up with: FSF 19.30.
|
|
25
|
|
26 ;;; Commentary:
|
|
27
|
|
28 ;; These are default settings for names of certain files and directories
|
|
29 ;; that Emacs needs to refer to from time to time.
|
|
30
|
|
31 ;; If these settings are not right, override them with `setq'
|
|
32 ;; in site-start.el. Do not change this file.
|
|
33
|
|
34 ;;; Code:
|
|
35
|
|
36 ;Note: FSF's version is:
|
|
37 ;(defvar Info-default-directory-list
|
|
38 ; (let ((start (list "/usr/local/lib/info/"
|
|
39 ; ;; This comes second so that, if it is the same
|
|
40 ; ;; as configure-info-directory (which is usually true)
|
|
41 ; ;; and Emacs has been installed (also usually true)
|
|
42 ; ;; then the list will end with two copies of this;
|
|
43 ; ;; which means that the last dir file Info-insert-dir
|
|
44 ; ;; finds will be the one in this directory.
|
|
45 ; "/usr/local/info/"))
|
|
46 ; (configdir (file-name-as-directory configure-info-directory)))
|
|
47 ; (setq start (nconc start (list configdir)))
|
|
48 ; start)
|
|
49 ; "List of directories to search for Info documentation files.
|
|
50 ;They are searched in the order they are given in this list.
|
|
51 ;Therefore, the directory of Info files that come with Emacs
|
|
52 ;normally should come last (so that local files override standard ones).")
|
|
53
|
|
54 ;Our commented-out version is:
|
|
55 ;(defvar Info-default-directory-list
|
|
56 ; (let ((start (list "/usr/local/info/"
|
|
57 ; "/usr/local/lib/info/"))
|
|
58 ; (configdir (file-name-as-directory configure-info-directory)))
|
|
59 ; (or (member configdir start)
|
|
60 ; (setq start (nconc start (list configdir))))
|
|
61 ; (or (member (expand-file-name "../info/" data-directory) start)
|
|
62 ; (setq start
|
|
63 ; (nconc start
|
|
64 ; (list (expand-file-name "../info/" data-directory)))))
|
|
65 ; start)
|
|
66 ; "List of directories to search for Info documentation files.")
|
|
67
|
|
68 (defvar news-path "/usr/spool/news/"
|
|
69 "The root directory below which all news files are stored.")
|
|
70
|
|
71 (defvar news-inews-program nil
|
|
72 "Program to post news.")
|
|
73
|
|
74 ;(defvar gnus-default-nntp-server ""
|
|
75 ; ;; set this to your local server
|
|
76 ; "The name of the host running an NNTP server.
|
|
77 ;If it is a string such as \":DIRECTORY\", then ~/DIRECTORY
|
|
78 ;is used as a news spool. `gnus-nntp-server' is initialised from NNTPSERVER
|
|
79 ;environment variable or, if none, this value.")
|
|
80
|
|
81 ;(defvar gnus-nntp-service "nntp"
|
|
82 ; "NNTP service name, usually \"nntp\" or 119).
|
|
83 ;Go to a local news spool if its value is nil, in which case `gnus-nntp-server'
|
|
84 ;should be set to `(system-name)'.")
|
|
85
|
|
86 (defvar gnus-local-domain nil
|
|
87 "*Your domain name without a host name: for example, \"ai.mit.edu\".
|
|
88 The DOMAINNAME environment variable is used instead if defined.
|
|
89 If the function `system-name' returns a fully qualified domain name,
|
|
90 there is no need to set this variable.")
|
|
91
|
|
92 (defvar gnus-local-organization nil
|
|
93 "*The name of your organization, as a string.
|
|
94 The `ORGANIZATION' environment variable is used instead if defined.")
|
|
95
|
|
96 (defvar mh-progs nil
|
|
97 "Directory containing MH commands.")
|
|
98
|
|
99 (defvar mh-lib nil
|
|
100 "Directory of MH library.")
|
|
101
|
|
102 (defvar rmail-file-name (purecopy "~/RMAIL")
|
|
103 "Name of user's primary mail file.")
|
|
104
|
|
105 (defvar gnus-startup-file (purecopy "~/.newsrc")
|
|
106 "The file listing groups to which user is subscribed.
|
|
107 Will use `gnus-startup-file'-SERVER instead if exists.")
|
|
108
|
|
109 (defconst rmail-spool-directory nil
|
|
110 "Name of directory used by system mailer for delivering new mail.
|
|
111 Its name should end with a slash.")
|
|
112
|
|
113 (defconst sendmail-program nil
|
|
114 "Program used to send messages.")
|
|
115
|
|
116 (defconst remote-shell-program nil
|
|
117 "Program used to execute shell commands on a remote machine.")
|
|
118
|
|
119 (defconst term-file-prefix
|
|
120 (purecopy (if (eq system-type 'vax-vms) "[.term]" "term/"))
|
|
121 "If non-nil, Emacs startup does (load (concat term-file-prefix (getenv \"TERM\")))
|
|
122 You may set this variable to nil in your `.emacs' file if you do not wish
|
|
123 the terminal-initialization file to be loaded.")
|
|
124
|
|
125 (defconst manual-program nil
|
|
126 "Program to run to print man pages.")
|
|
127
|
|
128 (defconst abbrev-file-name
|
|
129 (purecopy (if (eq system-type 'vax-vms)
|
|
130 "~/abbrev.def"
|
|
131 "~/.abbrev_defs"))
|
|
132 "*Default name of file to read abbrevs from.")
|
|
133
|
|
134 (defconst directory-abbrev-alist
|
|
135 (list
|
|
136 ;;
|
|
137 ;; This matches the default Sun automounter temporary mount points. These
|
|
138 ;; temporary mount points may go away, so it's important that we only try
|
|
139 ;; to read files under the "advertised" mount point, rather than the
|
|
140 ;; temporary one, or it will look like files have been deleted on us.
|
|
141 ;; Whoever came up with this design is clearly a moron of the first order,
|
|
142 ;; but now we're stuck with it, no doubt until the end of time.
|
|
143 ;;
|
|
144 ;; For best results, automounter junk should go near the front of this
|
|
145 ;; list, and other user translations should come after it.
|
|
146 ;;
|
|
147 ;; You may need to change this if you're not running the Sun automounter,
|
|
148 ;; if you're not running in the default configuration. Because the
|
|
149 ;; designers (and I use that term loosely) of the automounters failed to
|
|
150 ;; provide any uniform way of disambiguating a pathname, emacs needs to
|
|
151 ;; have knowledge about exactly how the automounter mangles pathnames
|
|
152 ;; (and this knowledge is basically impossible to derive at run-time.)
|
|
153 ;;
|
|
154 (cons (purecopy "\\`/tmp_mnt/") (purecopy "/"))
|
|
155 ))
|
|
156
|
|
157 ;; Formerly, the values of these variables were computed once
|
|
158 ;; (at dump time). However, with the advent of pre-compiled binaries
|
|
159 ;; and homebrewed systems such as Linux where who knows where the
|
|
160 ;; hell the various programs may be located (if they even exist at all),
|
|
161 ;; it's clear that we need to recompute these values at run time.
|
|
162 ;; In typical short-sightedness, site administrators have been told up
|
|
163 ;; till now to do `setq's in site-init.el, which is run only once --
|
|
164 ;; at dump time. So we have to do contortions to make sure we don't
|
|
165 ;; override values set in site-init.el.
|
|
166
|
|
167 (defun initialize-xemacs-paths ()
|
|
168 "Initialize the XEmacs path variables from the environment.
|
|
169 Called automatically at dump time and run time. Do not call this.
|
|
170 Will not override settings in site-init.el or site-run.el."
|
|
171 (let ((l #'(lambda (var value)
|
|
172 (let ((origsym (intern (concat "paths-el-original-"
|
|
173 (symbol-name var)))))
|
|
174 (if (running-temacs-p)
|
|
175 (progn
|
|
176 (set var value)
|
|
177 (set origsym value))
|
|
178 (and (eq (symbol-value var) (symbol-value origsym))
|
|
179 (set var value)))))))
|
|
180 (funcall
|
|
181 l 'news-inews-program
|
|
182 (cond ((file-exists-p "/usr/bin/inews") "/usr/bin/inews")
|
|
183 ((file-exists-p "/usr/local/inews") "/usr/local/inews")
|
|
184 ((file-exists-p "/usr/local/bin/inews") "/usr/local/bin/inews")
|
|
185 ((file-exists-p "/usr/lib/news/inews") "/usr/lib/news/inews")
|
|
186 (t "inews")))
|
|
187
|
|
188 (funcall
|
|
189 l 'mh-progs
|
|
190 (cond ((file-directory-p "/usr/bin/mh") "/usr/bin/mh/") ;Ultrix 4.2
|
|
191 ((file-directory-p "/usr/new/mh") "/usr/new/mh/") ;Ultrix <4.2
|
|
192 ((file-directory-p "/usr/local/bin/mh") "/usr/local/bin/mh/")
|
|
193 ((file-directory-p "/usr/local/mh") "/usr/local/mh/")
|
|
194 (t "/usr/local/bin/")))
|
|
195
|
|
196 (funcall
|
|
197 l 'mh-libs
|
|
198 (cond ((file-directory-p "/usr/lib/mh") "/usr/lib/mh/") ;Ultrix 4.2
|
|
199 ((file-directory-p "/usr/new/lib/mh")
|
|
200 "/usr/new/lib/mh/") ;Ultrix <4.2
|
|
201 ((file-directory-p "/usr/local/lib/mh") "/usr/local/lib/mh/")
|
|
202 (t "/usr/local/bin/mh/")))
|
|
203
|
|
204 (funcall
|
|
205 l 'rmail-spool-directory
|
|
206 (cond ((string-match "^[^-]+-[^-]+-sco3.2v4" system-configuration)
|
|
207 "/usr/spool/mail/")
|
|
208 ;; On The Bull DPX/2 /usr/spool/mail is used although
|
|
209 ;; it is usg-unix-v.
|
|
210 ((string-match "^m68k-bull-sysv3" system-configuration)
|
|
211 "/usr/spool/mail/")
|
|
212 ;; SVR4 and recent BSD are said to use this.
|
|
213 ;; Rather than trying to know precisely which systems use it,
|
|
214 ;; let's assume this dir is never used for anything else.
|
|
215 ((file-exists-p "/var/mail")
|
|
216 "/var/mail/")
|
|
217 ((memq system-type '(dgux hpux usg-unix-v unisoft-unix rtu irix))
|
|
218 "/usr/mail/")
|
183
|
219 ((memq system-type '(linux))
|
|
220 "/var/spool/mail/")
|
0
|
221 (t "/usr/spool/mail/")))
|
|
222
|
|
223 (funcall
|
|
224 l 'sendmail-program
|
|
225 (cond
|
|
226 ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
|
|
227 ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
|
|
228 ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
|
|
229 (t "fakemail"))) ;In ../etc, to interface to /bin/mail.
|
|
230
|
|
231 (funcall
|
|
232 l 'remote-shell-program
|
|
233 (cond
|
|
234 ;; Some systems use rsh for the remote shell; others use that
|
|
235 ;; name for the restricted shell and use remsh for the remote
|
|
236 ;; shell. Let's try to guess based on what we actually find
|
|
237 ;; out there. The restricted shell is almost certainly in
|
|
238 ;; /bin or /usr/bin, so it's probably safe to assume that an
|
|
239 ;; rsh found elsewhere is the remote shell program. The
|
|
240 ;; converse is not true: /usr/bin/rsh could be either one, so
|
|
241 ;; check that last.
|
|
242 ((file-exists-p "/usr/ucb/remsh") "/usr/ucb/remsh")
|
|
243 ((file-exists-p "/usr/bsd/remsh") "/usr/bsd/remsh")
|
|
244 ((file-exists-p "/bin/remsh") "/bin/remsh")
|
|
245 ((file-exists-p "/usr/bin/remsh") "/usr/bin/remsh")
|
|
246 ((file-exists-p "/usr/local/bin/remsh") "/usr/local/bin/remsh")
|
|
247 ((file-exists-p "/usr/ucb/rsh") "/usr/ucb/rsh")
|
|
248 ((file-exists-p "/usr/bsd/rsh") "/usr/bsd/rsh")
|
|
249 ((file-exists-p "/usr/local/bin/rsh") "/usr/local/bin/rsh")
|
|
250 ((file-exists-p "/usr/bin/rcmd") "/usr/bin/rcmd")
|
|
251 ((file-exists-p "/bin/rcmd") "/bin/rcmd")
|
|
252 ((file-exists-p "/bin/rsh") "/bin/rsh")
|
|
253 ((file-exists-p "/usr/bin/rsh") "/usr/bin/rsh")
|
|
254 (t "rsh")))
|
|
255
|
|
256 (funcall
|
|
257 l 'manual-program
|
|
258 ;; Solaris 2 has both of these files; prefer /usr/ucb/man
|
|
259 ;; because the other has nonstandard argument conventions.
|
|
260 (if (file-exists-p "/usr/ucb/man")
|
|
261 "/usr/ucb/man" "/usr/bin/man")))
|
|
262 )
|
|
263
|
|
264 (if (running-temacs-p)
|
|
265 (initialize-xemacs-paths))
|
|
266
|
|
267 ;;; paths.el ends here
|