[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master d92e0c5: * lisp/emacs-lisp/eieio-core.el (eieio-def
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] master d92e0c5: * lisp/emacs-lisp/eieio-core.el (eieio-defclass-internal): Reuse oldc. |
Date: |
Mon, 27 Apr 2015 19:33:47 +0000 |
branch: master
commit d92e0c58e859592eba21176a09797e083ff9c541
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* lisp/emacs-lisp/eieio-core.el (eieio-defclass-internal): Reuse oldc.
---
lisp/emacs-lisp/eieio-core.el | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
index 59d8348..582ac8a 100644
--- a/lisp/emacs-lisp/eieio-core.el
+++ b/lisp/emacs-lisp/eieio-core.el
@@ -277,12 +277,12 @@ See `defclass' for more information."
(setq eieio-hook nil)
(let* ((oldc (let ((c (eieio--class-v cname))) (if (eieio--class-p c) c)))
- (newc (if (and oldc (not (eieio--class-default-object-cache oldc)))
- ;; The oldc class is a stub setup by
eieio-defclass-autoload.
- ;; Reuse it instead of creating a new one, so that existing
- ;; references stay valid.
- oldc
- (eieio--class-make cname)))
+ (newc (or oldc
+ ;; Reuse `oldc' instead of creating a new one, so that
+ ;; existing references stay valid. E.g. when
+ ;; reloading the file that does the `defclass', we don't
+ ;; want to create a new class object.
+ (eieio--class-make cname)))
(groups nil) ;; list of groups id'd from slots
(clearparent nil))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master d92e0c5: * lisp/emacs-lisp/eieio-core.el (eieio-defclass-internal): Reuse oldc.,
Stefan Monnier <=