diff options
| author | Stefan Monnier | 2017-03-15 22:48:28 -0400 |
|---|---|---|
| committer | Lars Brinkhoff | 2017-04-04 08:23:46 +0200 |
| commit | 8e6f204f44b6183ba73c7d1bec5841f2b7b8bdd0 (patch) | |
| tree | 31f4a44bb5bc70144a0a7194b266f1e30fce3b9e /doc/misc | |
| parent | 056548283884d61b1b9637c3e56855ce3a17274d (diff) | |
| download | emacs-8e6f204f44b6183ba73c7d1bec5841f2b7b8bdd0.tar.gz emacs-8e6f204f44b6183ba73c7d1bec5841f2b7b8bdd0.zip | |
Make EIEIO use records.
* lisp/emacs-lisp/eieio-compat.el
(eieio--generic-static-object-generalizer): Adjust to new tags.
* lisp/emacs-lisp/eieio-core.el: Use records, and place the class object
directly as tag.
(eieio--object-class): Adjust to new tag representation.
(eieio-object-p): Rewrite, and adapt to new `type-of' behavior.
(eieio-defclass-internal): Use `make-record'.
(eieio--generic-generalizer): Adjust generalizer code accordingly.
* lisp/emacs-lisp/eieio.el (make-instance, clone): Use copy-record.
* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
Add `recordp'.
* doc/lispref/records.texi, doc/misc/eieio.texi: Update for records.
Diffstat (limited to 'doc/misc')
| -rw-r--r-- | doc/misc/eieio.texi | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi index dfae565deed..7076c244222 100644 --- a/doc/misc/eieio.texi +++ b/doc/misc/eieio.texi | |||
| @@ -1017,7 +1017,7 @@ If @var{errorp} is non-@code{nil}, @code{wrong-argument-type} is signaled. | |||
| 1017 | 1017 | ||
| 1018 | @defun class-p class | 1018 | @defun class-p class |
| 1019 | @anchor{class-p} | 1019 | @anchor{class-p} |
| 1020 | Return @code{t} if @var{class} is a valid class vector. | 1020 | Return @code{t} if @var{class} is a valid class object. |
| 1021 | @var{class} is a symbol. | 1021 | @var{class} is a symbol. |
| 1022 | @end defun | 1022 | @end defun |
| 1023 | 1023 | ||
| @@ -1055,7 +1055,7 @@ Will fetch the documentation string for @code{eieio-default-superclass}. | |||
| 1055 | Return a string of the form @samp{#<object-class myobjname>} for @var{obj}. | 1055 | Return a string of the form @samp{#<object-class myobjname>} for @var{obj}. |
| 1056 | This should look like Lisp symbols from other parts of Emacs such as | 1056 | This should look like Lisp symbols from other parts of Emacs such as |
| 1057 | buffers and processes, and is shorter and cleaner than printing the | 1057 | buffers and processes, and is shorter and cleaner than printing the |
| 1058 | object's vector. It is more useful to use @code{object-print} to get | 1058 | object's record. It is more useful to use @code{object-print} to get |
| 1059 | and object's print form, as this allows the object to add extra display | 1059 | and object's print form, as this allows the object to add extra display |
| 1060 | information into the symbol. | 1060 | information into the symbol. |
| 1061 | @end defun | 1061 | @end defun |
| @@ -1212,7 +1212,7 @@ items defined in this second slot. | |||
| 1212 | 1212 | ||
| 1213 | Introspection permits a programmer to peek at the contents of a class | 1213 | Introspection permits a programmer to peek at the contents of a class |
| 1214 | without any previous knowledge of that class. While @eieio{} implements | 1214 | without any previous knowledge of that class. While @eieio{} implements |
| 1215 | objects on top of vectors, and thus everything is technically visible, | 1215 | objects on top of records, and thus everything is technically visible, |
| 1216 | some functions have been provided. None of these functions are a part | 1216 | some functions have been provided. None of these functions are a part |
| 1217 | of CLOS. | 1217 | of CLOS. |
| 1218 | 1218 | ||
| @@ -1525,7 +1525,7 @@ Currently, the default superclass is defined as follows: | |||
| 1525 | nil | 1525 | nil |
| 1526 | "Default parent class for classes with no specified parent class. | 1526 | "Default parent class for classes with no specified parent class. |
| 1527 | Its slots are automatically adopted by classes with no specified | 1527 | Its slots are automatically adopted by classes with no specified |
| 1528 | parents. This class is not stored in the `parent' slot of a class vector." | 1528 | parents. This class is not stored in the `parent' slot of a class object." |
| 1529 | :abstract t) | 1529 | :abstract t) |
| 1530 | @end example | 1530 | @end example |
| 1531 | 1531 | ||