Initial Commit
[packages] / xemacs-packages / w3 / lisp / w3-cfg.el.in
1 ;;; w3-cfg.el --- Configuration info from Emacs/W3
2 ;; Author: wmperry
3 ;; Created: 1998/12/01 22:12:12
4 ;; Version: 1.1.1.1
5 ;; Keywords: hypermedia
6
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8 ;;; Copyright (c) 1998 Free Software Foundation, Inc.
9 ;;;
10 ;;; This file is part of GNU Emacs.
11 ;;;
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.
16 ;;;
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.
21 ;;;
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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
27
28 (defconst w3-configuration-data
29   '(
30     (srcdir              . "@srcdir@")
31     (datadir             . "@datadir@")
32     (prefix              . "@prefix@")
33     (infodir             . "@infodir@")
34     (lispdir             . "@lispdir@")
35     (EMACS               . "@EMACS@")
36     (CUSTOM              . "@CUSTOM@")
37     (EMACS_FLAVOR        . "@EMACS_FLAVOR@")
38     (EMACS_VERSION       . "@EMACS_VERSION@")
39     (EMACS_PACKAGE_DIR   . "@EMACS_PACKAGE_DIR@")
40     (XEMACS              . "@XEMACS@")
41     )
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.")
45
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))
53                                                 "")
54                          (substring info (match-end 0)))))
55     info))
56     
57 (provide 'w3-cfg)