2015-03-19 Stefan Monnier <monnier@iro.umontreal.ca>
- * emacs-lisp/eieio.el (with-slots): Use macroexp-let2.
- (object-class-fast): Change recommend replacement.
- (eieio-object-class): Rewrite.
- (slot-exists-p): Adjust to new slot representation.
- (initialize-instance): Adjust to new slot representation.
- (object-write): Adjust to new slot representation.
-
- * emacs-lisp/eieio-opt.el (eieio--help-print-slot): New function
- extracted from eieio-help-class-slots.
- (eieio-help-class-slots): Use it. Adjust to new slot representation.
+ * emacs-lisp/eieio.el (object-slots): Return slot names as before
+ (bug#20141).
- * emacs-lisp/eieio-datadebug.el (data-debug/eieio-insert-slots):
- Declare to silence warnings.
- (data-debug-insert-object-button): Avoid `object-slots'.
- (data-debug/eieio-insert-slots): Adjust to new slot representation.
-
- * emacs-lisp/eieio-custom.el (eieio-object-value-create)
- (eieio-object-value-get): Adjust to new slot representation.
+2015-03-19 Stefan Monnier <monnier@iro.umontreal.ca>
EIEIO: Change class's representation to unify instance and class slots
* emacs-lisp/eieio-core.el (eieio--class): Change field names and order
(eieio--class/struct-parents): New function.
(eieio--class-precedence-bfs): Use it.
- * emacs-lisp/eieio-compat.el (eieio--generic-static-symbol-specializers):
+ * emacs-lisp/eieio.el (with-slots): Use macroexp-let2.
+ (object-class-fast): Change recommend replacement.
+ (eieio-object-class): Rewrite.
+ (slot-exists-p): Adjust to new slot representation.
+ (initialize-instance): Adjust to new slot representation.
+ (object-write): Adjust to new slot representation.
+
+ * emacs-lisp/eieio-opt.el (eieio--help-print-slot): New function
+ extracted from eieio-help-class-slots.
+ (eieio-help-class-slots): Use it. Adjust to new slot representation.
+
+ * emacs-lisp/eieio-datadebug.el (data-debug/eieio-insert-slots):
+ Declare to silence warnings.
+ (data-debug-insert-object-button): Avoid `object-slots'.
+ (data-debug/eieio-insert-slots): Adjust to new slot representation.
+
+ * emacs-lisp/eieio-custom.el (eieio-object-value-create)
+ (eieio-object-value-get): Adjust to new slot representation.
+
+ * emacs-lisp/eieio-compat.el
+ (eieio--generic-static-symbol-specializers):
Extract from eieio--generic-static-symbol-generalizer.
(eieio--generic-static-symbol-generalizer): Use it.
(mapcar #'identity (eieio--class-slots class)))
(defun object-slots (obj)
- "Return list of slots available in OBJ."
+ "Return list of slot names available in OBJ."
(declare (obsolete eieio-class-slots "25.1"))
(cl-check-type obj eieio-object)
- (eieio-class-slots (eieio--object-class obj)))
+ (mapcar #'cl--slot-descriptor-name
+ (eieio-class-slots (eieio--object-class obj))))
(defun eieio--class-slot-initarg (class slot)
"Fetch from CLASS, SLOT's :initarg."