Add tinycustom.el and pcustom.el from Mikio Nakajima
[elisp/apel.git] / tinycustom.el
1 ;; tinycustom.el -- a tiny custom.el for emulating purpose.
2 ;; Copyright (C) 1999 Mikio Nakajima <minakaji@osaka.email.ne.jp>
3
4 ;; Author: Mikio Nakajima <minakaji@osaka.email.ne.jp>
5 ;; Maintainer: Mikio Nakajima <minakaji@osaka.email.ne.jp>
6 ;; Version: $Id: tinycustom.el,v 1.1 1999-03-16 11:51:30 morioka Exp $
7 ;; Keywords: emulating, custom
8 ;; Last Modified: $Date: 1999-03-16 11:51:30 $
9
10 ;; This file is not part of APEL (A Portable Emacs Library) yet.
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 GNU Emacs; 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 ;; Purpose of this program is emulating for who does not have 
29 ;; `custom.el'.
30 ;; DEFCUSTOM below has the same effect as the original DEFVAR has.
31 ;; DEFGROUP and DEFFACE below are just nop macro.
32
33 ;;; Code:
34 (require 'poe)
35
36 (defmacro-maybe defgroup (symbol members doc &rest args)
37   "Declare SYMBOL as a customization group containing MEMBERS.
38 SYMBOL does not need to be quoted.
39 Third arg DOC is the group documentation.
40
41 This is a nop defgroup only for emulating purpose.."
42   nil )
43     
44 (defmacro-maybe defcustom (symbol value doc &rest args) 
45   "Declare SYMBOL as a customizable variable that defaults to VALUE.
46 DOC is the variable documentation.
47
48 This is a defcustom only for emulating purpose.
49 Its effect is just as same as that of defvar."
50   (` (defvar (, symbol) (, value) (, doc))) )
51     
52 (defmacro-maybe defface (symbol value doc &rest args) 
53   "Declare FACE as a customizable face that defaults to SPEC.
54 FACE does not need to be quoted.
55
56 This is a nop defface only for emulating purpose."
57   nil )
58
59 (provide 'tinycustom)
60 (provide 'custom)
61 ;; end of tinycustom.el