]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/eieio-custom.el
Fix dead link in smie.el
[gnu-emacs] / lisp / emacs-lisp / eieio-custom.el
index 71ebf79d55455dabd96fa0646e60546b361728c5..b09f6b6a0e95221c5ef9db42d689e155397c34e2 100644 (file)
@@ -1,11 +1,11 @@
 ;;; eieio-custom.el -- eieio object customization
 
-;;; Copyright (C) 1999, 2000, 2001, 2005, 2007, 2008, 2009
-;;; Free Software Foundation, Inc.
+;; Copyright (C) 1999-2001, 2005, 2007-2012  Free Software Foundation, Inc.
 
-;; Author: Eric M. Ludlam  <zappo@gnu.org>
+;; Author: Eric M. Ludlam <zappo@gnu.org>
 ;; Version: 0.2
 ;; Keywords: OO, lisp
+;; Package: eieio
 
 ;; This file is part of GNU Emacs.
 
@@ -25,7 +25,7 @@
 ;;; Commentary:
 ;;
 ;;   This contains support customization of eieio objects.  Enabling
-;; your object to be customizable requires use of the slot attirbute
+;; your object to be customizable requires use of the slot attribute
 ;; `:custom'.
 
 (require 'eieio)
 (require 'custom)
 
 ;;; Compatibility
-;;
-(eval-and-compile
-  (if (featurep 'xemacs)
-      (defalias 'eieio-overlay-lists (lambda () (list (extent-list))))
-    (defalias 'eieio-overlay-lists 'overlay-lists)
-    )
-  )
+
+;; (eval-and-compile
+;;   (if (featurep 'xemacs)
+;;       (defalias 'eieio-overlay-lists (lambda () (list (extent-list))))
+;;     (defalias 'eieio-overlay-lists 'overlay-lists)))
+
 ;;; Code:
 (defclass eieio-widget-test-class nil
   ((a-string :initarg :a-string
@@ -91,7 +90,7 @@ of these.")
 (defvar eieio-cog nil
   "Buffer local variable in object customize buffers for the current group.")
 
- (defvar eieio-custom-ignore-eieio-co  nil
+ (defvar eieio-custom-ignore-eieio-co nil
    "When true, all customizable slots of the current object are updated.
 Updates occur regardless of the current customization group.")
 
@@ -109,14 +108,7 @@ Updates occur regardless of the current customization group.")
 
 (defun eieio-slot-value-create (widget)
   "Create the value of WIDGET."
-  (let ((chil nil)
-       )
-;    (setq chil (cons (widget-create-child-and-convert
-;                    widget 'visibility
-;                    :help-echo "Hide the value of this option."
-;                    :action 'eieio-custom-toggle-parent
-;                    t)
-;                   chil))
+  (let ((chil nil))
     (setq chil (cons
                (widget-create-child-and-convert
                 widget (widget-get widget :childtype)
@@ -235,7 +227,7 @@ Optional argument IGNORE is an extraneous parameter."
       (when (and (car fcust)
                 (or (not master-group) (member master-group (car fgroup)))
                 (slot-boundp obj (car slots)))
-       ;; In this case, this slot has a custom type.  Create it's
+       ;; In this case, this slot has a custom type.  Create its
        ;; children widgets.
        (let ((type (eieio-filter-slot-type widget (car fcust)))
              (stuff nil))
@@ -328,12 +320,13 @@ Optional argument IGNORE is an extraneous parameter."
     obj))
 
 (defmethod eieio-done-customizing ((obj eieio-default-superclass))
-  "When a applying change to a widget, call this method.
-This method is called by the default widget-edit commands.  User made
-commands should also call this method when applying changes.
+  "When applying change to a widget, call this method.
+This method is called by the default widget-edit commands.
+User made commands should also call this method when applying changes.
 Argument OBJ is the object that has been customized."
   nil)
 
+;;;###autoload
 (defun customize-object (obj &optional group)
   "Customize OBJ in a custom buffer.
 Optional argument GROUP is the sub-group of slots to display."
@@ -355,7 +348,7 @@ These groups are specified with the `:group' slot flag."
     (toggle-read-only -1)
     (kill-all-local-variables)
     (erase-buffer)
-    (let ((all (eieio-overlay-lists)))
+    (let ((all (overlay-lists)))
       ;; Delete all the overlays.
       (mapc 'delete-overlay (car all))
       (mapc 'delete-overlay (cdr all)))
@@ -382,7 +375,7 @@ These groups are specified with the `:group' slot flag."
 
 (defmethod eieio-custom-object-apply-reset ((obj eieio-default-superclass))
   "Insert an Apply and Reset button into the object editor.
-Argument OBJ os the object being customized."
+Argument OBJ is the object being customized."
   (widget-create 'push-button
                 :notify (lambda (&rest ignore)
                           (widget-apply eieio-wo :value-get)
@@ -393,16 +386,16 @@ Argument OBJ os the object being customized."
   (widget-create 'push-button
                 :notify (lambda (&rest ignore)
                           ;; I think the act of getting it sets
-                          ;; it's value through the get function.
+                          ;; its value through the get function.
                           (message "Applying Changes...")
                           (widget-apply eieio-wo :value-get)
                           (eieio-done-customizing eieio-co)
-                          (message "Applying Changes...Done."))
+                          (message "Applying Changes...Done"))
                 "Apply")
   (widget-insert "   ")
   (widget-create 'push-button
                 :notify (lambda (&rest ignore)
-                          (message "Resetting.")
+                          (message "Resetting")
                           (eieio-customize-object eieio-co eieio-cog))
                 "Reset")
   (widget-insert "   ")
@@ -468,4 +461,8 @@ Return the symbol for the group, or nil"
 
 (provide 'eieio-custom)
 
+;; Local variables:
+;; generated-autoload-file: "eieio.el"
+;; End:
+
 ;;; eieio-custom.el ends here