Mercurial > hg > xemacs-beta
annotate lisp/paths.el @ 5894:23178aa71f8b
Define ALIGNOF using C11 and C++11 operators.
See <CAHCOHQmG51R61KwGUNY7T5t9tXxzbyg=aGijUKYstbE+wL2-6Q@mail.gmail.com> in
xemacs-patches for more information.
author | Jerry James <james@xemacs.org> |
---|---|
date | Mon, 20 Apr 2015 15:09:11 -0600 |
parents | 308d34e9f07d |
children |
rev | line source |
---|---|
428 | 1 ;;; paths.el --- define pathnames for use by various Emacs commands. |
2 | |
3 ;; Copyright (C) 1986, 1988, 1993, 1994, 1997 Free Software Foundation, Inc. | |
4 | |
5 ;; Maintainer: FSF | |
6 ;; Keywords: internal, dumped | |
7 | |
8 ;; This file is part of XEmacs. | |
9 | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4759
diff
changeset
|
10 ;; XEmacs is free software: you can redistribute it and/or modify it |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4759
diff
changeset
|
11 ;; under the terms of the GNU General Public License as published by the |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4759
diff
changeset
|
12 ;; Free Software Foundation, either version 3 of the License, or (at your |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4759
diff
changeset
|
13 ;; option) any later version. |
428 | 14 |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4759
diff
changeset
|
15 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4759
diff
changeset
|
16 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4759
diff
changeset
|
17 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4759
diff
changeset
|
18 ;; for more details. |
428 | 19 |
20 ;; You should have received a copy of the GNU General Public License | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
4759
diff
changeset
|
21 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
428 | 22 |
23 ;;; Synched up with: FSF 19.30. | |
24 | |
25 ;;; Commentary: | |
26 | |
27 ;; This file is dumped with XEmacs. | |
28 | |
29 ;; These are default settings for names of certain files and directories | |
30 ;; that Emacs needs to refer to from time to time. | |
31 | |
32 ;; If these settings are not right, override them with `setq' | |
33 ;; in site-start.el. Do not change this file. | |
34 | |
35 ;;; Code: | |
36 | |
37 ;Note: FSF's version is: | |
38 ;(defvar Info-default-directory-list | |
39 ; (let ((start (list "/usr/local/lib/info/" | |
40 ; ;; This comes second so that, if it is the same | |
41 ; ;; as configure-info-directory (which is usually true) | |
42 ; ;; and Emacs has been installed (also usually true) | |
43 ; ;; then the list will end with two copies of this; | |
44 ; ;; which means that the last dir file Info-insert-dir | |
45 ; ;; finds will be the one in this directory. | |
46 ; "/usr/local/info/")) | |
47 ; (configdir (file-name-as-directory configure-info-directory))) | |
48 ; (setq start (nconc start (list configdir))) | |
49 ; start) | |
50 ; "List of directories to search for Info documentation files. | |
51 ;They are searched in the order they are given in this list. | |
52 ;Therefore, the directory of Info files that come with Emacs | |
53 ;normally should come last (so that local files override standard ones).") | |
54 | |
55 ;Our commented-out version is: | |
56 ;(defvar Info-default-directory-list | |
57 ; (let ((start (list "/usr/local/info/" | |
58 ; "/usr/local/lib/info/")) | |
59 ; (configdir (file-name-as-directory configure-info-directory))) | |
60 ; (or (member configdir start) | |
61 ; (setq start (nconc start (list configdir)))) | |
62 ; (or (member (expand-file-name "../info/" data-directory) start) | |
63 ; (setq start | |
64 ; (nconc start | |
65 ; (list (expand-file-name "../info/" data-directory))))) | |
66 ; start) | |
67 ; "List of directories to search for Info documentation files.") | |
68 | |
69 (defvar news-path "/usr/spool/news/" | |
70 "The root directory below which all news files are stored.") | |
71 | |
72 (defvar news-inews-program nil | |
73 "Program to post news.") | |
74 | |
75 ;(defvar gnus-default-nntp-server "" | |
76 ; ;; set this to your local server | |
77 ; "The name of the host running an NNTP server. | |
78 ;If it is a string such as \":DIRECTORY\", then ~/DIRECTORY | |
79 ;is used as a news spool. `gnus-nntp-server' is initialized from NNTPSERVER | |
80 ;environment variable or, if none, this value.") | |
81 | |
82 ;(defvar gnus-nntp-service "nntp" | |
83 ; "NNTP service name, usually \"nntp\" or 119). | |
84 ;Go to a local news spool if its value is nil, in which case `gnus-nntp-server' | |
85 ;should be set to `(system-name)'.") | |
86 | |
87 (defvar mh-progs nil | |
88 "Directory containing MH commands.") | |
89 | |
90 (defvar mh-lib nil | |
91 "Directory of MH library.") | |
92 | |
444 | 93 (defvar rmail-file-name "~/RMAIL" |
428 | 94 "Name of user's primary mail file.") |
95 | |
96 (defconst rmail-spool-directory nil | |
97 "Name of directory used by system mailer for delivering new mail. | |
98 Its name should end with a slash.") | |
99 | |
100 (defconst sendmail-program nil | |
101 "Program used to send messages.") | |
102 | |
103 (defconst remote-shell-program nil | |
104 "Program used to execute shell commands on a remote machine.") | |
105 | |
444 | 106 (defconst term-file-prefix "term/" |
428 | 107 "If non-nil, Emacs startup does (load (concat term-file-prefix (getenv \"TERM\"))) |
108 You may set this variable to nil in your `.emacs' file if you do not wish | |
109 the terminal-initialization file to be loaded.") | |
110 | |
111 (defconst manual-program nil | |
112 "Program to run to print man pages.") | |
113 | |
444 | 114 (defconst abbrev-file-name "~/.abbrev_defs" |
428 | 115 "*Default name of file to read abbrevs from.") |
116 | |
117 (defconst directory-abbrev-alist nil) | |
118 | |
119 ;; Formerly, the values of these variables were computed once | |
120 ;; (at dump time). However, with the advent of pre-compiled binaries | |
121 ;; and homebrewed systems such as Linux where who knows where the | |
122 ;; hell the various programs may be located (if they even exist at all), | |
123 ;; it's clear that we need to recompute these values at run time. | |
124 ;; In typical short-sightedness, site administrators have been told up | |
125 ;; till now to do `setq's in site-init.el, which is run only once -- | |
126 ;; at dump time. So we have to do contortions to make sure we don't | |
127 ;; override values set in site-init.el. | |
128 | |
129 (defun initialize-xemacs-paths () | |
130 "Initialize the XEmacs path variables from the environment. | |
131 Called automatically at dump time and run time. Do not call this. | |
132 Will not override settings in site-init.el or site-run.el." | |
133 (let ((l #'(lambda (var value) | |
134 (let ((origsym (intern (concat "paths-el-original-" | |
135 (symbol-name var))))) | |
136 (if (running-temacs-p) | |
137 (progn | |
138 (set var value) | |
139 (set origsym value)) | |
140 (and (eq (symbol-value var) (symbol-value origsym)) | |
141 (set var value))))))) | |
142 (funcall | |
143 l 'news-inews-program | |
144 (cond ((file-exists-p "/usr/bin/inews") "/usr/bin/inews") | |
145 ((file-exists-p "/usr/local/inews") "/usr/local/inews") | |
146 ((file-exists-p "/usr/local/bin/inews") "/usr/local/bin/inews") | |
147 ((file-exists-p "/usr/lib/news/inews") "/usr/lib/news/inews") | |
148 (t "inews"))) | |
149 | |
150 (funcall | |
151 l 'mh-progs | |
4759
aa5ed11f473b
Remove support for obsolete systems. See xemacs-patches message with ID
Jerry James <james@xemacs.org>
parents:
444
diff
changeset
|
152 (cond ((file-directory-p "/usr/bin/mh") "/usr/bin/mh/") |
428 | 153 ((file-directory-p "/usr/local/bin/mh") "/usr/local/bin/mh/") |
154 ((file-directory-p "/usr/local/mh") "/usr/local/mh/") | |
155 (t "/usr/local/bin/"))) | |
156 | |
157 (funcall | |
158 l 'mh-libs | |
4759
aa5ed11f473b
Remove support for obsolete systems. See xemacs-patches message with ID
Jerry James <james@xemacs.org>
parents:
444
diff
changeset
|
159 (cond ((file-directory-p "/usr/lib/mh") "/usr/lib/mh/") |
428 | 160 ((file-directory-p "/usr/local/lib/mh") "/usr/local/lib/mh/") |
161 (t "/usr/local/bin/mh/"))) | |
162 | |
163 (funcall | |
164 l 'rmail-spool-directory | |
4759
aa5ed11f473b
Remove support for obsolete systems. See xemacs-patches message with ID
Jerry James <james@xemacs.org>
parents:
444
diff
changeset
|
165 (cond ;; SVR4 and recent BSD are said to use this. |
428 | 166 ;; Rather than trying to know precisely which systems use it, |
167 ;; let's assume this dir is never used for anything else. | |
168 ((file-exists-p "/var/mail") | |
169 "/var/mail/") | |
4759
aa5ed11f473b
Remove support for obsolete systems. See xemacs-patches message with ID
Jerry James <james@xemacs.org>
parents:
444
diff
changeset
|
170 ((memq system-type '(hpux usg-unix-v irix)) |
428 | 171 "/usr/mail/") |
172 ((memq system-type '(linux)) | |
173 "/var/spool/mail/") | |
174 (t "/usr/spool/mail/"))) | |
175 | |
176 (funcall | |
177 l 'sendmail-program | |
178 (cond | |
179 ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail") | |
180 ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail") | |
181 ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail") | |
182 (t "fakemail"))) ;In ../etc, to interface to /bin/mail. | |
183 | |
184 (funcall | |
185 l 'remote-shell-program | |
186 (cond | |
187 ;; Some systems use rsh for the remote shell; others use that | |
188 ;; name for the restricted shell and use remsh for the remote | |
189 ;; shell. Let's try to guess based on what we actually find | |
190 ;; out there. The restricted shell is almost certainly in | |
191 ;; /bin or /usr/bin, so it's probably safe to assume that an | |
192 ;; rsh found elsewhere is the remote shell program. The | |
193 ;; converse is not true: /usr/bin/rsh could be either one, so | |
194 ;; check that last. | |
195 ((file-exists-p "/usr/ucb/remsh") "/usr/ucb/remsh") | |
196 ((file-exists-p "/usr/bsd/remsh") "/usr/bsd/remsh") | |
197 ((file-exists-p "/bin/remsh") "/bin/remsh") | |
198 ((file-exists-p "/usr/bin/remsh") "/usr/bin/remsh") | |
199 ((file-exists-p "/usr/local/bin/remsh") "/usr/local/bin/remsh") | |
200 ((file-exists-p "/usr/ucb/rsh") "/usr/ucb/rsh") | |
201 ((file-exists-p "/usr/bsd/rsh") "/usr/bsd/rsh") | |
202 ((file-exists-p "/usr/local/bin/rsh") "/usr/local/bin/rsh") | |
203 ((file-exists-p "/usr/bin/rcmd") "/usr/bin/rcmd") | |
204 ((file-exists-p "/bin/rcmd") "/bin/rcmd") | |
205 ((file-exists-p "/bin/rsh") "/bin/rsh") | |
206 ((file-exists-p "/usr/bin/rsh") "/usr/bin/rsh") | |
207 (t "rsh"))) | |
208 | |
209 (funcall | |
210 l 'manual-program | |
211 ;; Solaris 2 has both of these files; prefer /usr/ucb/man | |
212 ;; because the other has nonstandard argument conventions. | |
213 (if (file-exists-p "/usr/ucb/man") | |
214 "/usr/ucb/man" "/usr/bin/man")) | |
215 | |
216 (funcall | |
217 l 'directory-abbrev-alist | |
218 ;; Try to match various conventions for automounter temporary | |
219 ;; mount points. These temporary mount points may go away, so | |
220 ;; it's important that we only try to read files under the | |
221 ;; "advertised" mount point, rather than the temporary one, or it | |
222 ;; will look like files have been deleted on us. Whoever came up | |
223 ;; with this design is clearly a moron of the first order, but | |
224 ;; now we're stuck with it, no doubt until the end of time. | |
225 ;; | |
226 ;; For best results, automounter junk should go near the front of this | |
227 ;; list, and other user translations should come after it. | |
228 ;; | |
229 ;; Our code handles the following empirically observed conventions: | |
230 ;; /net is an actual directory! (some systems are not broken!) | |
231 ;; /net/HOST -> /tmp_mnt/net/HOST (`standard' old Sun automounter) | |
232 ;; /net/HOST -> /tmp_mnt/HOST (BSDI 4.0) | |
233 ;; /net/HOST -> /a/HOST (Freebsd 2.2.x) | |
234 ;; /net/HOST -> /amd/HOST (seen in amd sample config files) | |
235 ;; | |
236 ;; If your system has a different convention, you may have to change this. | |
237 ;; Don't forget to send in a patch! | |
238 (when (file-directory-p "/net") | |
239 (append | |
240 (when (file-directory-p "/tmp_mnt") | |
241 (if (file-directory-p "/tmp_mnt/net") | |
242 '(("\\`/tmp_mnt/net/" . "/net/")) | |
243 '(("\\`/tmp_mnt/" . "/net/")))) | |
244 (when (file-directory-p "/a") | |
245 '(("\\`/a/" . "/net/"))) | |
246 (when (file-directory-p "/amd") | |
247 '(("\\`/amd/" . "/net/"))) | |
248 ))) | |
249 )) | |
250 | |
251 (if (running-temacs-p) | |
252 (initialize-xemacs-paths)) | |
253 | |
254 ;;; paths.el ends here |