update.
[elisp/apel.git] / tinycustom.el
index 47789ad..0e4ee0a 100644 (file)
@@ -1,13 +1,12 @@
 ;; tinycustom.el -- a tiny custom.el for emulating purpose.
+
 ;; Copyright (C) 1999 Mikio Nakajima <minakaji@osaka.email.ne.jp>
 
 ;; Author: Mikio Nakajima <minakaji@osaka.email.ne.jp>
 ;; Maintainer: Mikio Nakajima <minakaji@osaka.email.ne.jp>
-;; Version: $Id: tinycustom.el,v 1.1 1999-03-16 11:51:30 morioka Exp $
 ;; Keywords: emulating, custom
-;; Last Modified: $Date: 1999-03-16 11:51:30 $
 
-;; This file is not part of APEL (A Portable Emacs Library) yet.
+;; This file is part of APEL (A Portable Emacs Library).
 
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
 ;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
-;; Purpose of this program is emulating for who does not have 
+
+;; Purpose of this program is emulating for who does not have
 ;; `custom.el'.
+;;
 ;; DEFCUSTOM below has the same effect as the original DEFVAR has.
-;; DEFGROUP and DEFFACE below are just nop macro.
+;; DEFFACE only makes a face.
+;; DEFGROUP and DEFINE-WIDGET below are just nop macro.
 
 ;;; Code:
+
 (require 'poe)
 
 (defmacro-maybe defgroup (symbol members doc &rest args)
@@ -38,7 +41,7 @@
 SYMBOL does not need to be quoted.
 Third arg DOC is the group documentation.
 
-This is a nop defgroup only for emulating purpose.."
+This is a nop defgroup only for emulating purpose."
   nil )
     
 (defmacro-maybe defcustom (symbol value doc &rest args) 
@@ -49,13 +52,28 @@ This is a defcustom only for emulating purpose.
 Its effect is just as same as that of defvar."
   (` (defvar (, symbol) (, value) (, doc))) )
     
-(defmacro-maybe defface (symbol value doc &rest args) 
-  "Declare FACE as a customizable face that defaults to SPEC.
+(if (featurep 'faces)
+    (defmacro-maybe defface (face value doc &rest args) 
+      "Declare FACE as a customizable face that defaults to SPEC.
+FACE does not need to be quoted.
+
+This is a defface which only makes face FACE for emulating purpose."
+      (` (make-face (, face))) )
+  (defmacro-maybe defface (face value doc &rest args) 
+    "Declare FACE as a customizable face that defaults to SPEC.
 FACE does not need to be quoted.
 
 This is a nop defface only for emulating purpose."
+    nil ) )
+
+(defmacro-maybe define-widget (name class doc)
+  "Define a new widget type named NAME from CLASS.
+The third argument DOC is a documentation string for the widget.
+
+This is a nop define-widget only for emulating purpose."
   nil )
 
 (provide 'tinycustom)
 (provide 'custom)
+
 ;; end of tinycustom.el