diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-02-18 21:57:04 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-02-18 21:57:04 -0500 |
commit | 8ca4f1e02e22f74dc269b01bc4a32e01dd226dae (patch) | |
tree | 0ed0df06d6430b812797c5ed3f4ff15b425a8dae /lisp/emacs-lisp/eieio-datadebug.el | |
parent | 6a0fda530d1d76374f72f8dfb2a0a3d50023e64d (diff) | |
download | emacs-8ca4f1e02e22f74dc269b01bc4a32e01dd226dae.tar.gz |
Cleanup some of EIEIO's namespace.
* lisp/emacs-lisp/eieio.el (eieio--define-field-accessors): New macro.
Use it to define all the class-* and object-* field accessors (renamed
to eieio--class-* and eieio--object-*). Update all uses.
(eieio--class-num-slots, eieio--object-num-slots): Rename from
class-num-slots and object-num-slots.
(eieio--check-type): New macro.
(eieio-defclass, eieio-oref, eieio-oref-default, same-class-p)
(object-of-class-p, child-of-class-p, object-slots, class-slot-initarg)
(eieio-oset, eieio-oset-default, object-assoc, object-assoc-list)
(object-assoc-list-safe): Use it.
(eieio-defclass): Tighten regexp.
(eieio--defmethod): Use `memq'. Signal an error for unknown method kind.
Remove unreachable code.
(object-class-fast): Declare obsolete.
(eieio-class-name, eieio-object-name, eieio-object-set-name-string)
(eieio-object-class, eieio-object-class-name, eieio-class-parents)
(eieio-class-children, eieio-class-precedence-list, eieio-class-parent):
Rename from class-name, object-name, object-set-name-string,
object-class, object-class-name, class-parents, class-children,
class-precedence-list, class-parent; with obsolete alias.
(class-of, class-direct-superclasses, class-direct-subclasses):
Declare obsolete.
(eieio-defmethod): Use `memq'; remove unreachable code.
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-opt.el (eieio-class-button, eieio-describe-generic)
(eieio-browse-tree, eieio-browse): Use eieio--check-type.
Diffstat (limited to 'lisp/emacs-lisp/eieio-datadebug.el')
-rw-r--r-- | lisp/emacs-lisp/eieio-datadebug.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/eieio-datadebug.el b/lisp/emacs-lisp/eieio-datadebug.el index e23bbb07fe2..7daa24257a1 100644 --- a/lisp/emacs-lisp/eieio-datadebug.el +++ b/lisp/emacs-lisp/eieio-datadebug.el @@ -58,9 +58,9 @@ PREBUTTONTEXT is some text between PREFIX and the object button." (end nil) (str (object-print object)) (tip (format "Object %s\nClass: %S\nParent(s): %S\n%d slots" - (object-name-string object) - (object-class object) - (class-parents (object-class object)) + (eieio-object-name-string object) + (eieio-object-class object) + (eieio-class-parents (eieio-object-class object)) (length (object-slots object)) )) ) @@ -82,16 +82,16 @@ PREBUTTONTEXT is some text between PREFIX and the object button." (defmethod data-debug/eieio-insert-slots ((obj eieio-default-superclass) prefix) "Insert the slots of OBJ into the current DDEBUG buffer." - (data-debug-insert-thing (object-name-string obj) + (data-debug-insert-thing (eieio-object-name-string obj) prefix "Name: ") - (let* ((cl (object-class obj)) + (let* ((cl (eieio-object-class obj)) (cv (class-v cl))) (data-debug-insert-thing (class-constructor cl) prefix "Class: ") ;; Loop over all the public slots - (let ((publa (aref cv class-public-a)) + (let ((publa (eieio--class-public-a cv)) ) (while publa (if (slot-boundp obj (car publa)) @@ -123,7 +123,7 @@ PREBUTTONTEXT is some text between PREFIX and the object button." ;; (defmethod data-debug-show ((obj eieio-default-superclass)) "Run ddebug against any EIEIO object OBJ." - (data-debug-new-buffer (format "*%s DDEBUG*" (object-name obj))) + (data-debug-new-buffer (format "*%s DDEBUG*" (eieio-object-name obj))) (data-debug-insert-object-slots obj "]")) ;;; DEBUG FUNCTIONS |