aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/eieio-core.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
index 59d834837b0..582ac8a6524 100644
--- a/lisp/emacs-lisp/eieio-core.el
+++ b/lisp/emacs-lisp/eieio-core.el
@@ -277,12 +277,12 @@ See `defclass' for more information."
277 (setq eieio-hook nil) 277 (setq eieio-hook nil)
278 278
279 (let* ((oldc (let ((c (eieio--class-v cname))) (if (eieio--class-p c) c))) 279 (let* ((oldc (let ((c (eieio--class-v cname))) (if (eieio--class-p c) c)))
280 (newc (if (and oldc (not (eieio--class-default-object-cache oldc))) 280 (newc (or oldc
281 ;; The oldc class is a stub setup by eieio-defclass-autoload. 281 ;; Reuse `oldc' instead of creating a new one, so that
282 ;; Reuse it instead of creating a new one, so that existing 282 ;; existing references stay valid. E.g. when
283 ;; references stay valid. 283 ;; reloading the file that does the `defclass', we don't
284 oldc 284 ;; want to create a new class object.
285 (eieio--class-make cname))) 285 (eieio--class-make cname)))
286 (groups nil) ;; list of groups id'd from slots 286 (groups nil) ;; list of groups id'd from slots
287 (clearparent nil)) 287 (clearparent nil))
288 288