bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20141: 24.4.91; Helm is broken after last changes in eieio


From: Stefan Monnier
Subject: bug#20141: 24.4.91; Helm is broken after last changes in eieio
Date: Thu, 19 Mar 2015 10:20:26 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> (eieio-class-slots 'helm-source)
[...]
> Until today it returned (name), now, you get
> ([cl-struct-cl-slot-descriptor name nil t nil])

eieio-class-slots is new in Emacs-25, so it's OK if it's different
from yesterday.  But indeed, it looks I failed to adapt object-slots.
Does the patch below fix the problems people are seeing?


        Stefan


diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 4ba6769..8d76df8 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."





reply via email to

[Prev in Thread] Current Thread [Next in Thread]