From 29f7f98b7c3755f8f9e9dcef60bd460794cf2104 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 19 Mar 2015 10:35:52 -0400 Subject: [PATCH] Fixes: debbugs:20141 * lisp/emacs-lisp/eieio.el (object-slots): Return slot names as before. --- lisp/ChangeLog | 42 ++++++++++++++++++++++++------------------ lisp/emacs-lisp/eieio.el | 5 +++-- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7c751f4e8e8..74a0988c98f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,23 +1,9 @@ 2015-03-19 Stefan Monnier - * 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 EIEIO: Change class's representation to unify instance and class slots * emacs-lisp/eieio-core.el (eieio--class): Change field names and order @@ -41,7 +27,27 @@ (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. diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 4ba67693175..8d76df874e5 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -453,10 +453,11 @@ The CLOS function `class-direct-subclasses' is aliased to this function." (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." -- 2.11.4.GIT