From xemacs-m  Mon Mar 24 12:05:08 1997
Received: from elc1.dina.kvl.dk (elc1.dina.kvl.dk [130.225.40.228])
	by xemacs.org (8.8.5/8.8.5) with SMTP id MAA14666
	for <xemacs-beta@xemacs.org>; Mon, 24 Mar 1997 12:05:07 -0600 (CST)
Received: from zuse.dina.kvl.dk (zuse.dina.kvl.dk [130.225.40.245]) by elc1.dina.kvl.dk (8.6.12/8.6.4) with ESMTP id SAA01438; Mon, 24 Mar 1997 18:54:10 +0100
Received: (abraham@localhost) by zuse.dina.kvl.dk (8.6.12/8.6.4) id TAA17644; Mon, 24 Mar 1997 19:03:13 +0100
Sender: abraham@dina.kvl.dk
To: xemacs-beta@xemacs.org
Subject: Supporting custom in XEmacs 19.14/Emacs 19.34 applications (was: Re: xmine 1.0)
References: <m3bu8arb0l.fsf@jens.metrix.de> <QQcidg18206.199703231704@crystal.WonderWorks.COM> <m34te22j5d.fsf@jens.metrix.de>
Organization: The Church of Emacs
X-Face: +kRV2]2q}lixHkE{U)mY#+6]{AH=yN~S9@IFiOa@X6?GM<U{B+4e{k79.Ya{~':DblFPCg$
 @60,BfLv2@SKZ19cMWK0/C'v;tM:|6B'R}U1rp6CL&kN({9<zF/V{:JCg27yC)9oZjeqcQawzKfiNL
 t9}`vjmK["dRQC/qGFQq"%u|Q`:6{"Rz}b(dnl_"3$Jtqimi>|8MBp/
From: Per Abrahamsen <abraham@dina.kvl.dk>
Date: 24 Mar 1997 19:03:13 +0100
In-Reply-To: Jens Lautenbacher's message of 24 Mar 1997 02:06:22 +0100
Message-ID: <rj67yhqiam.fsf_-_@zuse.dina.kvl.dk>
Lines: 23
X-Mailer: Gnus v5.4.26/Emacs 19.34
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit


Jens Lautenbacher <jens@metrix.de> writes:

> I can't. There aren't thousands of Meerschweinchen that have a XEmacs
> with a new custom integrated, and I don't want to answer all these
> questions about how to install this -- while it barfs on the old
> custom included with gnus.... Must be people from the beta list.

wmperry wrote this beautiful kludge for w3, which allows the use of
`defcustom' and `defgroup' in applications that must work on older
Emacsen.  Unfortunately, it doesn't work with `defface'.

(eval-and-compile
  (condition-case ()
      (require 'custom)
    (error nil))
  (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
      nil ;; We've got what we needed
    ;; We have the old custom-library, hack around it!
    (defmacro defgroup (&rest args)
      nil)
    (defmacro defcustom (var value doc &rest args) 
      (` (defvar (, var) (, value) (, doc))))))

