* lisp/emacs-lisp/eieio.el (defclass): Fix bug#51068

Accept (defclass <class> <superclasses> (.. <slotname> ..)) without
having to wrap the slot name within parentheses.
This commit is contained in:
Stefan Monnier 2022-09-23 17:42:55 -04:00
parent 759d1145e2
commit 40bc027bf4

View file

@ -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))