Mercurial > hg > xemacs-beta
comparison lisp/paths.el @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children | e121b013d1f0 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:376386a54a3c |
---|---|
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/") | |
219 (t "/usr/spool/mail/"))) | |
220 | |
221 (funcall | |
222 l 'sendmail-program | |
223 (cond | |
224 ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail") | |
225 ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail") | |
226 ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail") | |
227 (t "fakemail"))) ;In ../etc, to interface to /bin/mail. | |
228 | |
229 (funcall | |
230 l 'remote-shell-program | |
231 (cond | |
232 ;; Some systems use rsh for the remote shell; others use that | |
233 ;; name for the restricted shell and use remsh for the remote | |
234 ;; shell. Let's try to guess based on what we actually find | |
235 ;; out there. The restricted shell is almost certainly in | |
236 ;; /bin or /usr/bin, so it's probably safe to assume that an | |
237 ;; rsh found elsewhere is the remote shell program. The | |
238 ;; converse is not true: /usr/bin/rsh could be either one, so | |
239 ;; check that last. | |
240 ((file-exists-p "/usr/ucb/remsh") "/usr/ucb/remsh") | |
241 ((file-exists-p "/usr/bsd/remsh") "/usr/bsd/remsh") | |
242 ((file-exists-p "/bin/remsh") "/bin/remsh") | |
243 ((file-exists-p "/usr/bin/remsh") "/usr/bin/remsh") | |
244 ((file-exists-p "/usr/local/bin/remsh") "/usr/local/bin/remsh") | |
245 ((file-exists-p "/usr/ucb/rsh") "/usr/ucb/rsh") | |
246 ((file-exists-p "/usr/bsd/rsh") "/usr/bsd/rsh") | |
247 ((file-exists-p "/usr/local/bin/rsh") "/usr/local/bin/rsh") | |
248 ((file-exists-p "/usr/bin/rcmd") "/usr/bin/rcmd") | |
249 ((file-exists-p "/bin/rcmd") "/bin/rcmd") | |
250 ((file-exists-p "/bin/rsh") "/bin/rsh") | |
251 ((file-exists-p "/usr/bin/rsh") "/usr/bin/rsh") | |
252 (t "rsh"))) | |
253 | |
254 (funcall | |
255 l 'manual-program | |
256 ;; Solaris 2 has both of these files; prefer /usr/ucb/man | |
257 ;; because the other has nonstandard argument conventions. | |
258 (if (file-exists-p "/usr/ucb/man") | |
259 "/usr/ucb/man" "/usr/bin/man"))) | |
260 ) | |
261 | |
262 (if (running-temacs-p) | |
263 (initialize-xemacs-paths)) | |
264 | |
265 ;;; paths.el ends here |