summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2015-04-14 23:04:45 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2015-04-14 23:04:45 -0400
commit5de3427203ac1fc0badd01a447c65cf45ecf1403 (patch)
tree92ef90e36b83bc01b784be317b15c1b538da81d9 /lisp/emacs-lisp
parent17d667b3876920652152baa4eab24134940a0f30 (diff)
downloademacs-5de3427203ac1fc0badd01a447c65cf45ecf1403.tar.gz
emacs-5de3427203ac1fc0badd01a447c65cf45ecf1403.tar.bz2
emacs-5de3427203ac1fc0badd01a447c65cf45ecf1403.zip
* lisp/emacs-lisp/eieio-core.el (eieio--class): Derive from cl--class
(eieio--class-p): Remove, provided by cl-defstruct.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/eieio-core.el21
1 files changed, 1 insertions, 20 deletions
diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
index 272bb0768af..59d834837b0 100644
--- a/lisp/emacs-lisp/eieio-core.el
+++ b/lisp/emacs-lisp/eieio-core.el
@@ -89,21 +89,8 @@ Currently under control of this var:
(cl-defstruct (eieio--class
(:constructor nil)
(:constructor eieio--class-make (name &aux (tag 'defclass)))
- (:type vector)
+ (:include cl--class)
(:copier nil))
- ;; We use an untagged cl-struct, with our own hand-made tag as first field
- ;; (containing the symbol `defclass'). It would be better to use a normal
- ;; cl-struct with its normal tag (e.g. so that cl-defstruct can define the
- ;; predicate for us), but that breaks compatibility with .elc files compiled
- ;; against older versions of EIEIO.
- tag
- ;; Fields we could inherit from cl--class (if we used a tagged cl-struct):
- (name nil :type symbol) ;The type name.
- (docstring nil :type string)
- (parents nil :type (or eieio--class (list-of eieio--class)))
- (slots nil :type (vector cl-slot-descriptor))
- (index-table nil :type hash-table)
- ;; Fields specific to EIEIO classes:
children
initarg-tuples ;; initarg tuples list
(class-slots nil :type eieio--slot)
@@ -152,12 +139,6 @@ Currently under control of this var:
(or (eieio--class-v class) class)
class))
-(defsubst eieio--class-p (class)
- "Return non-nil if CLASS is a valid class object."
- (condition-case nil
- (eq (aref class 0) 'defclass)
- (error nil)))
-
(defun class-p (class)
"Return non-nil if CLASS is a valid class vector.
CLASS is a symbol." ;FIXME: Is it a vector or a symbol?