diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-10-06 16:00:21 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-10-06 16:00:21 -0400 |
commit | 47cf2a37e7f7d2df3cc05b657b1b4ad8307c7c64 (patch) | |
tree | c32439e23d01746e88a81582b7c8ebb74e47c70a /lisp/emacs-lisp/eieio.el | |
parent | dc8108e10910352ab97c8200b23672072c374a91 (diff) | |
download | emacs-47cf2a37e7f7d2df3cc05b657b1b4ad8307c7c64.tar.gz emacs-47cf2a37e7f7d2df3cc05b657b1b4ad8307c7c64.tar.bz2 emacs-47cf2a37e7f7d2df3cc05b657b1b4ad8307c7c64.zip |
* eieio-core.el (eieio--full-class-object): New function.
Rather than explicitly call eieio-class-un-autoload, the autoloading is
now performed on-demand if you use eieio--full-class-object.
* lisp/emacs-lisp/eieio-core.el (eieio-class-un-autoload): Remove.
(eieio--full-class-object): New function, to replace it.
(eieio-oref, eieio--class-precedence-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-convert-list-to-object):
Use it instead of eieio-class-un-autoload.
* lisp/emacs-lisp/eieio.el (eieio-class-parents, child-of-class-p):
Load the class if needed.
Diffstat (limited to 'lisp/emacs-lisp/eieio.el')
-rw-r--r-- | lisp/emacs-lisp/eieio.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 4b899cdc64a..9c3420176f1 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -425,10 +425,11 @@ If EXTRA, include that in the string returned to represent the symbol." 'object-class-name 'eieio-object-class-name "24.4") (defun eieio-class-parents (class) + ;; FIXME: What does "(overload of variable)" mean here? "Return parent classes to CLASS. (overload of variable). The CLOS function `class-direct-superclasses' is aliased to this function." - (eieio--class-parents (eieio--class-object class))) + (eieio--class-parents (eieio--full-class-object class))) (define-obsolete-function-alias 'class-parents #'eieio-class-parents "24.4") @@ -468,7 +469,7 @@ The CLOS function `class-direct-subclasses' is aliased to this function." (defun child-of-class-p (child class) "Return non-nil if CHILD class is a subclass of CLASS." - (setq child (eieio--class-object child)) + (setq child (eieio--full-class-object child)) (cl-check-type child eieio--class) ;; `eieio-default-superclass' is never mentioned in eieio--class-parents, ;; so we have to special case it here. |