comparison lisp/paths.el @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents 4f79e16b1112
children 8626e4521993
comparison
equal deleted inserted replaced
370:bd866891f083 371:cc15677e0335
125 the terminal-initialization file to be loaded.") 125 the terminal-initialization file to be loaded.")
126 126
127 (defconst manual-program nil 127 (defconst manual-program nil
128 "Program to run to print man pages.") 128 "Program to run to print man pages.")
129 129
130 (defconst abbrev-file-name 130 (defconst abbrev-file-name
131 (purecopy (if (eq system-type 'vax-vms) 131 (purecopy (if (eq system-type 'vax-vms)
132 "~/abbrev.def" 132 "~/abbrev.def"
133 "~/.abbrev_defs")) 133 "~/.abbrev_defs"))
134 "*Default name of file to read abbrevs from.") 134 "*Default name of file to read abbrevs from.")
135 135
136 (defconst directory-abbrev-alist nil) 136 (defconst directory-abbrev-alist
137 (list
138 ;;
139 ;; This matches the default Sun automounter temporary mount points. These
140 ;; temporary mount points may go away, so it's important that we only try
141 ;; to read files under the "advertised" mount point, rather than the
142 ;; temporary one, or it will look like files have been deleted on us.
143 ;; Whoever came up with this design is clearly a moron of the first order,
144 ;; but now we're stuck with it, no doubt until the end of time.
145 ;;
146 ;; For best results, automounter junk should go near the front of this
147 ;; list, and other user translations should come after it.
148 ;;
149 ;; You may need to change this if you're not running the Sun automounter,
150 ;; if you're not running in the default configuration. Because the
151 ;; designers (and I use that term loosely) of the automounters failed to
152 ;; provide any uniform way of disambiguating a pathname, emacs needs to
153 ;; have knowledge about exactly how the automounter mangles pathnames
154 ;; (and this knowledge is basically impossible to derive at run-time.)
155 ;;
156 (cons (purecopy "\\`/tmp_mnt/") (purecopy "/"))
157 ))
137 158
138 ;; Formerly, the values of these variables were computed once 159 ;; Formerly, the values of these variables were computed once
139 ;; (at dump time). However, with the advent of pre-compiled binaries 160 ;; (at dump time). However, with the advent of pre-compiled binaries
140 ;; and homebrewed systems such as Linux where who knows where the 161 ;; and homebrewed systems such as Linux where who knows where the
141 ;; hell the various programs may be located (if they even exist at all), 162 ;; hell the various programs may be located (if they even exist at all),
184 205
185 (funcall 206 (funcall
186 l 'rmail-spool-directory 207 l 'rmail-spool-directory
187 (cond ((string-match "^[^-]+-[^-]+-sco3.2v4" system-configuration) 208 (cond ((string-match "^[^-]+-[^-]+-sco3.2v4" system-configuration)
188 "/usr/spool/mail/") 209 "/usr/spool/mail/")
189 ;; On The Bull DPX/2 /usr/spool/mail is used although 210 ;; On The Bull DPX/2 /usr/spool/mail is used although
190 ;; it is usg-unix-v. 211 ;; it is usg-unix-v.
191 ((string-match "^m68k-bull-sysv3" system-configuration) 212 ((string-match "^m68k-bull-sysv3" system-configuration)
192 "/usr/spool/mail/") 213 "/usr/spool/mail/")
193 ;; SVR4 and recent BSD are said to use this. 214 ;; SVR4 and recent BSD are said to use this.
194 ;; Rather than trying to know precisely which systems use it, 215 ;; Rather than trying to know precisely which systems use it,
237 (funcall 258 (funcall
238 l 'manual-program 259 l 'manual-program
239 ;; Solaris 2 has both of these files; prefer /usr/ucb/man 260 ;; Solaris 2 has both of these files; prefer /usr/ucb/man
240 ;; because the other has nonstandard argument conventions. 261 ;; because the other has nonstandard argument conventions.
241 (if (file-exists-p "/usr/ucb/man") 262 (if (file-exists-p "/usr/ucb/man")
242 "/usr/ucb/man" "/usr/bin/man")) 263 "/usr/ucb/man" "/usr/bin/man")))
243 264 )
244 (funcall
245 l 'directory-abbrev-alist
246 ;; Try to match various conventions for automounter temporary
247 ;; mount points. These temporary mount points may go away, so
248 ;; it's important that we only try to read files under the
249 ;; "advertised" mount point, rather than the temporary one, or it
250 ;; will look like files have been deleted on us. Whoever came up
251 ;; with this design is clearly a moron of the first order, but
252 ;; now we're stuck with it, no doubt until the end of time.
253 ;;
254 ;; For best results, automounter junk should go near the front of this
255 ;; list, and other user translations should come after it.
256 ;;
257 ;; Our code handles the following empirically observed conventions:
258 ;; /net is an actual directory! (some systems are not broken!)
259 ;; /net/HOST -> /tmp_mnt/net/HOST (`standard' old Sun automounter)
260 ;; /net/HOST -> /tmp_mnt/HOST (BSDI 4.0)
261 ;; /net/HOST -> /a/HOST (Freebsd 2.2.x)
262 ;; /net/HOST -> /amd/HOST (seen in amd sample config files)
263 ;;
264 ;; If your system has a different convention, you may have to change this.
265 ;; Don't forget to send in a patch!
266 (when (file-directory-p "/net")
267 (append
268 (when (file-directory-p "/tmp_mnt")
269 (if (file-directory-p "/tmp_mnt/net")
270 '(("\\`/tmp_mnt/net/" . "/net/"))
271 '(("\\`/tmp_mnt/" . "/net/"))))
272 (when (file-directory-p "/a")
273 '(("\\`/a/" . "/net/")))
274 (when (file-directory-p "/amd")
275 '(("\\`/amd/" . "/net/")))
276 )))
277 ))
278 265
279 (if (running-temacs-p) 266 (if (running-temacs-p)
280 (initialize-xemacs-paths)) 267 (initialize-xemacs-paths))
281 268
282 ;;; paths.el ends here 269 ;;; paths.el ends here