1 ;;; pcustom.el -- a portable custom.el.
3 ;; Copyright (C) 1999 Mikio Nakajima <minakaji@osaka.email.ne.jp>
4 ;; Copyright (C) 1999 Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
6 ;; Author: Mikio Nakajima <minakaji@osaka.email.ne.jp>
7 ;; Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
8 ;; Maintainer: Mikio Nakajima <minakaji@osaka.email.ne.jp>
9 ;; Keywords: emulating, custom
11 ;; This file is part of APEL (A Portable Emacs Library).
13 ;; This program is free software; you can redistribute it and/or
14 ;; modify it under the terms of the GNU General Public License as
15 ;; published by the Free Software Foundation; either version 2, or (at
16 ;; your option) any later version.
18 ;; This program is distributed in the hope that it will be useful, but
19 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 ;; General Public License for more details.
23 ;; You should have received a copy of the GNU General Public License
24 ;; along with this program; see the file COPYING. If not, write to the
25 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
26 ;; Boston, MA 02111-1307, USA.
31 ;; If old compiler is used under v18, `eval-when-compile' and
32 ;; `static-if' are expanded (and evaluated) at *load-time*.
33 (eval-when-compile (require 'static))
35 ;; XXX: needs better abstraction.
36 (static-if (condition-case nil
37 ;; compile-time check.
38 ;; "new custom" requires widget library.
39 (and (require 'widget)
41 (fboundp 'custom-declare-variable))
43 (if (null (featurep 'pcustom))
46 ** New CUSTOM library is not detected. If you have that one, e.g. v1.9962,
47 ** please specify the installed path of the new CUSTOM library in the file
48 ** \"subdirs.el\" and rebuild this package. For example, if you have
49 ** installed it in \"/usr/local/share/emacs/site-lisp/custom/\", put the
50 ** following line in the file \"/usr/local/share/emacs/site-lisp/subdirs.el\".
52 ** (normal-top-level-add-to-load-path '(\"custom\"))
54 ** Note that the argument can be a list of subdirectories.
58 ;; you have "new custom". no load-time check.
60 ;; your custom is "old custom", or you don't have custom library
62 (or (condition-case nil
64 ;; load "custom" if exists.
65 (and (require 'custom)
66 (fboundp 'custom-declare-variable))
68 ;; your custom is "old custom", or you don't have custom library.
69 ;; load emulation version of "new custom".
70 (require 'tinycustom)))