X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=pcustom.el;h=4d023f14d2cfdacf5aa28434e1b5b7e7fea6ea7f;hb=ac4f931debe149ecf30f7e327ac053ab7202bd39;hp=c687061e33f23b7a969323d5c0f11349c6b74dc9;hpb=ab53c9eeb511a944145391851b5499f5f294c65f;p=elisp%2Fapel.git diff --git a/pcustom.el b/pcustom.el index c687061..4d023f1 100644 --- a/pcustom.el +++ b/pcustom.el @@ -1,9 +1,10 @@ ;;; pcustom.el -- a portable custom.el. +;; Copyright (C) 1999 Free Software Foundation, Inc. ;; Copyright (C) 1999 Mikio Nakajima ;; Author: Mikio Nakajima -;; Maintainer: Mikio Nakajima +;; Shuhei KOBAYASHI ;; Keywords: emulating, custom ;; This file is part of APEL (A Portable Emacs Library). @@ -19,16 +20,46 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the +;; along with this program; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. +;;; Commentary: + ;;; Code: -(condition-case nil +(require 'poe) +(eval-when-compile (require 'static)) + +(static-if (condition-case nil + ;; compile-time check. + (if (and (require 'custom) + (fboundp 'custom-declare-variable)) + ;; you have "new custom". + t + ;; you have custom, but it is "old". + (message "\ + ** \"old custom\" is loaded. See README if you want to use \"new custom\".") + (sleep-for 1) + nil) + ;; you don't have custom. + (error nil)) + ;; you have "new custom". no load-time check. (require 'custom) - (error (require 'tinycustom)) ) + ;; your custom is "old custom", + ;; or you don't have custom library at compile-time. + (or (condition-case nil + ;; load-time check. + ;; load "custom" if exists. + (and (require 'custom) + (fboundp 'custom-declare-variable)) + (error nil)) + ;; your custom is "old custom", + ;; or you don't have custom library. + ;; load emulation version of "new custom". + (require 'tinycustom))) -(provide 'pcustom) +(require 'product) +(product-provide (provide 'pcustom) (require 'apel-ver)) -;; end of pcustom.el +;;; pcustom.el ends here