Require 'poe.
[elisp/apel.git] / pcustom.el
1 ;;; pcustom.el -- a portable custom.el.
2
3 ;; Copyright (C) 1999 Mikio Nakajima <minakaji@osaka.email.ne.jp>
4 ;; Copyright (C) 1999 Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
5
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
10
11 ;; This file is part of APEL (A Portable Emacs Library).
12
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.
17
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.
22
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.
27
28 ;;; Code:
29
30 (require 'poe)
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))
34
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)
40                     (require 'custom)
41                     (fboundp 'custom-declare-variable))
42              (error nil))
43     ;; you have "new custom". no load-time check.
44     (require 'custom)
45   ;; your custom is "old custom", or you don't have custom library
46   ;; at compile-time.
47   (or (condition-case nil
48           ;; load-time check.
49           ;; "new custom" requires widget library.
50           (and (require 'widget)
51                (require 'custom)
52                (fboundp 'custom-declare-variable))
53         (error nil))
54       ;; load emulation version.
55       (require 'tinycustom)))
56
57 (provide 'pcustom)
58
59 ;; end of pcustom.el