(define-widget): Accept the optional arguments.
[elisp/apel.git] / tinycustom.el
1 ;; tinycustom.el -- a tiny custom.el for emulating purpose.
2
3 ;; Copyright (C) 1999 Mikio Nakajima <minakaji@osaka.email.ne.jp>
4
5 ;; Author: Mikio Nakajima <minakaji@osaka.email.ne.jp>
6 ;; Maintainer: Mikio Nakajima <minakaji@osaka.email.ne.jp>
7 ;; Keywords: emulating, custom
8
9 ;; This file is part of APEL (A Portable Emacs Library).
10
11 ;; This program is free software; you can redistribute it and/or
12 ;; modify it under the terms of the GNU General Public License as
13 ;; published by the Free Software Foundation; either version 2, or (at
14 ;; your option) any later version.
15
16 ;; This program is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 ;; General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
25
26 ;;; Commentary:
27
28 ;; Purpose of this program is emulating for who does not have
29 ;; `custom.el'.
30 ;;
31 ;; DEFCUSTOM below has the same effect as the original DEFVAR has.
32 ;; DEFFACE only makes a face.
33 ;; DEFGROUP and DEFINE-WIDGET below are just nop macro.
34
35 ;;; Code:
36
37 (require 'poe)
38
39 (defmacro-maybe defgroup (symbol members doc &rest args)
40   "Declare SYMBOL as a customization group containing MEMBERS.
41 SYMBOL does not need to be quoted.
42 Third arg DOC is the group documentation.
43
44 This is a nop defgroup only for emulating purpose."
45   nil )
46     
47 (defmacro-maybe defcustom (symbol value doc &rest args) 
48   "Declare SYMBOL as a customizable variable that defaults to VALUE.
49 DOC is the variable documentation.
50
51 This is a defcustom only for emulating purpose.
52 Its effect is just as same as that of defvar."
53   (` (defvar (, symbol) (, value) (, doc))) )
54     
55 (if (featurep 'faces)
56     (defmacro-maybe defface (face value doc &rest args) 
57       "Declare FACE as a customizable face that defaults to SPEC.
58 FACE does not need to be quoted.
59
60 This is a defface which only makes face FACE for emulating purpose."
61       (` (make-face (, face))) )
62   (defmacro-maybe defface (face value doc &rest args) 
63     "Declare FACE as a customizable face that defaults to SPEC.
64 FACE does not need to be quoted.
65
66 This is a nop defface only for emulating purpose."
67     nil ) )
68
69 (defmacro-maybe define-widget (name class doc &rest args)
70   "Define a new widget type named NAME from CLASS.
71 The third argument DOC is a documentation string for the widget.
72
73 This is a nop define-widget only for emulating purpose."
74   nil )
75
76 (provide 'tinycustom)
77 (provide 'custom)
78
79 ;; end of tinycustom.el