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 ;; you have "new custom". no load-time check.
45 ;; your custom is "old custom", or you don't have custom library
47 (or (condition-case nil
49 ;; load "custom" if exists.
50 (and (require 'custom)
51 (fboundp 'custom-declare-variable))
53 ;; your custom is "old custom", or you don't have custom library.
54 ;; load emulation version of "new custom".
55 (require 'tinycustom)))