]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/eieio-custom.el
Remove some obsolete trace.el commentary
[gnu-emacs] / lisp / emacs-lisp / eieio-custom.el
index 7fa4e7cd4dce1ca389657044de223663995d14a6..46dc34d6d4593b4b02029a229585bb2aff249eae 100644 (file)
@@ -1,11 +1,12 @@
 ;;; 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-2013 Free Software Foundation,
+;; Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 ;; Version: 0.2
 ;; Keywords: OO, lisp
+;; Package: eieio
 
 ;; This file is part of GNU Emacs.
 
@@ -326,11 +327,22 @@ 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."
   (eieio-customize-object obj group))
 
+(defvar eieio-custom-mode-map
+  (let ((map (make-sparse-keymap)))
+    (set-keymap-parent map widget-keymap)
+    map)
+  "Keymap for EIEIO Custom mode")
+
+(define-derived-mode eieio-custom-mode fundamental-mode "EIEIO Custom"
+  "Major mode for customizing EIEIO objects.
+\\{eieio-custom-mode-map}")
+
 (defmethod eieio-customize-object ((obj eieio-default-superclass)
                                   &optional group)
   "Customize OBJ in a specialized custom buffer.
@@ -344,8 +356,9 @@ These groups are specified with the `:group' slot flag."
                       (concat "*CUSTOMIZE "
                               (object-name obj) " "
                               (symbol-name g) "*")))
-    (toggle-read-only -1)
+    (setq buffer-read-only nil)
     (kill-all-local-variables)
+    (eieio-custom-mode)
     (erase-buffer)
     (let ((all (overlay-lists)))
       ;; Delete all the overlays.
@@ -362,7 +375,6 @@ These groups are specified with the `:group' slot flag."
     (widget-insert "\n")
     (eieio-custom-object-apply-reset obj)
     ;; Now initialize the buffer
-    (use-local-map widget-keymap)
     (widget-setup)
     ;;(widget-minor-mode)
     (goto-char (point-min))
@@ -460,5 +472,4 @@ Return the symbol for the group, or nil"
 
 (provide 'eieio-custom)
 
-;; arch-tag: bc122762-a771-48d5-891b-7835b16dd924
 ;;; eieio-custom.el ends here