diff options
Diffstat (limited to 'lisp/emacs-lisp/eieio.el')
-rw-r--r-- | lisp/emacs-lisp/eieio.el | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index edc0c34ad3a..df85a64baf3 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -184,8 +184,9 @@ and reference them using the function `class-option'." (when (and initarg (eq alloc :class)) (push (cons sname - (format "Meaningless :initarg for class allocated slot '%S'" - sname)) + (format-message + "Meaningless :initarg for class allocated slot `%S'" + sname)) warnings)) (let ((init (plist-get soptions :initform))) @@ -212,9 +213,8 @@ and reference them using the function `class-option'." ,(internal--format-docstring-line "Retrieve the slot `%S' from an object of class `%S'." sname name) - ;; FIXME: Why is this different from the :reader case? - (if (slot-boundp this ',sname) (eieio-oref this ',sname))) - accessors) + (slot-value this ',sname)) + accessors) (when (and eieio-backward-compatibility (eq alloc :class)) ;; FIXME: How could I declare this *method* as obsolete. (push `(cl-defmethod ,acces ((this (subclass ,name))) @@ -648,8 +648,7 @@ If SLOT is unbound, bind it to the list containing ITEM." (setq ov (list item)) (setq ov (eieio-oref object slot)) ;; turn it into a list. - (unless (listp ov) - (setq ov (list ov))) + (setq ov (ensure-list ov)) ;; Do the combination (if (not (member item ov)) (setq ov |