source: projects/emacsen-common/trunk/apel-sample/usr/share/emacs/site-lisp/apel/pcustom.el @ 7238

Revision 7238, 2.1 KB checked in by daisuke, 12 years ago (diff)

import emacsen-common

Line 
1;;; pcustom.el -- a portable custom.el.
2
3;; Copyright (C) 1999 Free Software Foundation, Inc.
4;; Copyright (C) 1999 Mikio Nakajima <minakaji@osaka.email.ne.jp>
5
6;; Author: Mikio Nakajima <minakaji@osaka.email.ne.jp>
7;;      Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
8;; Keywords: emulating, custom
9
10;; This file is part of APEL (A Portable Emacs Library).
11
12;; This program is free software; you can redistribute it and/or
13;; modify it under the terms of the GNU General Public License as
14;; published by the Free Software Foundation; either version 2, or (at
15;; your option) any later version.
16
17;; This program is distributed in the hope that it will be useful, but
18;; WITHOUT ANY WARRANTY; without even the implied warranty of
19;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20;; General Public License for more details.
21
22;; You should have received a copy of the GNU General Public License
23;; along with this program; 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;;; Commentary:
28
29;;; Code:
30
31(require 'poe)
32(eval-when-compile (require 'static))
33
34(static-if (condition-case nil
35               ;; compile-time check.
36               (if (and (require 'custom)
37                        (fboundp 'custom-declare-variable))
38                   ;; you have "new custom".
39                   t
40                 ;; you have custom, but it is "old".
41                 (message "\
42  ** \"old custom\" is loaded.  See README if you want to use \"new custom\".")
43                 (sleep-for 1)
44                 nil)
45             ;; you don't have custom.
46             (error nil))
47    ;; you have "new custom". no load-time check.
48    (require 'custom)
49  ;; your custom is "old custom",
50  ;; or you don't have custom library at compile-time.
51  (or (condition-case nil
52          ;; load-time check.
53          ;; load "custom" if exists.
54          (and (require 'custom)
55               (fboundp 'custom-declare-variable))
56        (error nil))
57      ;; your custom is "old custom",
58      ;; or you don't have custom library.
59      ;; load emulation version of "new custom".
60      (require 'tinycustom)))
61
62(require 'product)
63(product-provide (provide 'pcustom) (require 'apel-ver))
64
65;;; pcustom.el ends here
Note: See TracBrowser for help on using the repository browser.