summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2022-09-23 17:42:55 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2022-09-23 17:42:55 -0400
commit40bc027bf44e540fdf702bb56f139a7d95ee55c0 (patch)
tree0c9120238e9468d753bd1ac86e4a732c5f7340c9
parent759d1145e2cb04fde83cf721d3d1fd0644e9c8f1 (diff)
downloademacs-40bc027bf44e540fdf702bb56f139a7d95ee55c0.tar.gz
* lisp/emacs-lisp/eieio.el (defclass): Fix bug#51068
Accept (defclass <class> <superclasses> (.. <slotname> ..)) without having to wrap the slot name within parentheses.
-rw-r--r--lisp/emacs-lisp/eieio.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 984166b593a..a6c900a3355 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -136,6 +136,7 @@ and reference them using the function `class-option'."
(accessors ()))
;; Collect the accessors we need to define.
+ (setq slots (mapcar (lambda (x) (if (consp x) x (list x))) slots))
(pcase-dolist (`(,sname . ,soptions) slots)
(let* ((acces (plist-get soptions :accessor))
(initarg (plist-get soptions :initarg))