X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=pcustom.el;h=4d023f14d2cfdacf5aa28434e1b5b7e7fea6ea7f;hb=fcd8e41edad4c4bc4df9c8ed25e83ed8eeb46e40;hp=aa6a9f1cc241ebb6c7c872403facbc06a3ada030;hpb=93dbc292d18b23df55796d2b82d865210bcfe7fd;p=elisp%2Fapel.git diff --git a/pcustom.el b/pcustom.el index aa6a9f1..4d023f1 100644 --- a/pcustom.el +++ b/pcustom.el @@ -1,11 +1,10 @@ ;;; pcustom.el -- a portable custom.el. +;; Copyright (C) 1999 Free Software Foundation, Inc. ;; Copyright (C) 1999 Mikio Nakajima -;; Copyright (C) 1999 Shuhei KOBAYASHI ;; Author: Mikio Nakajima ;; Shuhei KOBAYASHI -;; Maintainer: Mikio Nakajima ;; Keywords: emulating, custom ;; This file is part of APEL (A Portable Emacs Library). @@ -25,50 +24,42 @@ ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. +;;; Commentary: + ;;; Code: (require 'poe) -;; If old compiler is used under v18, `eval-when-compile' and -;; `static-if' are expanded (and evaluated) at *load-time*. (eval-when-compile (require 'static)) -;; XXX: needs better abstraction. (static-if (condition-case nil ;; compile-time check. - ;; "new custom" requires widget library. - (and (require 'widget) - (require 'custom) - (fboundp 'custom-declare-variable)) - (error - (if (null (featurep 'pcustom)) - (progn - (message " - ** New CUSTOM library is not detected. If you have that one, e.g. v1.9962, - ** please specify the installed path of the new CUSTOM library in the file - ** \"subdirs.el\" and rebuild this package. For example, if you have - ** installed it in \"/usr/local/share/emacs/site-lisp/custom/\", put the - ** following line in the file \"/usr/local/share/emacs/site-lisp/subdirs.el\". - ** - ** (normal-top-level-add-to-load-path '(\"custom\")) - ** - ** Note that the argument can be a list of subdirectories. -") - (sleep-for 1))) - nil)) + (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) - ;; your custom is "old custom", or you don't have custom library - ;; at compile-time. + ;; 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. + ;; 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