1 ;;; w3-cfg.el --- Configuration info from Emacs/W3
3 ;; Created: 1998/12/01 22:12:12
5 ;; Keywords: hypermedia
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8 ;;; Copyright (c) 1998 Free Software Foundation, Inc.
10 ;;; This file is part of GNU Emacs.
12 ;;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;;; it under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 2, or (at your option)
15 ;;; any later version.
17 ;;; GNU Emacs is distributed in the hope that it will be useful,
18 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;;; Boston, MA 02111-1307, USA.
26 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
28 (defconst w3-configuration-data
31 (datadir . "$(prefix)/etc/w3")
32 (prefix . "/tmp/staging/w3")
33 (infodir . "$(prefix)/info")
34 (lispdir . "$(prefix)/lisp/w3")
36 (CUSTOM . "/usr/local/lib/xemacs-21.0-b63/lisp/")
37 (EMACS_FLAVOR . "xemacs")
38 (EMACS_VERSION . "21.0")
39 (EMACS_PACKAGE_DIR . "/tmp/staging/w3")
42 "Emacs/W3 configuration data.
43 This data is from the configuration step in building Emacs/W3, and
44 the data may not accurately reflect your current environment.")
46 (defun w3-configuration-data (option &optional default)
47 (let ((info (or (cdr-safe (assq option w3-configuration-data)) default)))
48 (if (not (stringp info))
49 (setq info (eval info)))
50 (while (string-match "\\$[({]\\([^{(]+\\)[})]" info)
51 (setq info (concat (substring info 0 (match-beginning 0))
52 (w3-configuration-data (intern (match-string 1 info))
54 (substring info (match-end 0)))))