diff options
| author | Basil L. Contovounesios | 2020-06-03 17:35:59 +0100 |
|---|---|---|
| committer | Basil L. Contovounesios | 2020-06-06 17:24:00 +0100 |
| commit | 8bcc781bc762b4082cfd678b88938e3d03465d91 (patch) | |
| tree | c633ddabe6c442953e08f60eff889966d5214703 /doc | |
| parent | acd2cb28ef63188bff31fc167ab007a051f99c17 (diff) | |
| download | emacs-8bcc781bc762b4082cfd678b88938e3d03465d91.tar.gz emacs-8bcc781bc762b4082cfd678b88938e3d03465d91.zip | |
Un-deprecate oset and oset-default
For discussion see the following threads:
https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg00630.html
https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg00674.html
https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00099.html
* lisp/emacs-lisp/eieio.el (oset, oset-default): Un-deprecate.
* lisp/emacs-lisp/eieio-core.el (eieio-oref): Declare gv-setter here
instead of in lisp/emacs-lisp/eieio.el. Suggested by
Stefan Monnier <monnier@iro.umontreal.ca>.
(eieio-oref-default): Add gv-setter declaration.
* etc/NEWS: Announce these changes.
* doc/misc/eieio.texi (Accessing Slots): Document oref and
oref-default as generalized variables. Consistently document
getters before setters.
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Use
lexical-binding.
(eieio-test-13-init-methods): Simplify.
(eieio-test-33-instance-tracker): Declare IT-list as special.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/misc/eieio.texi | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi index 3943c544c7d..6e7d4386bec 100644 --- a/doc/misc/eieio.texi +++ b/doc/misc/eieio.texi | |||
| @@ -698,6 +698,27 @@ and argument-order conventions are similar to those used for | |||
| 698 | referencing vectors (@pxref{Vectors,,,elisp,GNU Emacs Lisp Reference | 698 | referencing vectors (@pxref{Vectors,,,elisp,GNU Emacs Lisp Reference |
| 699 | Manual}). | 699 | Manual}). |
| 700 | 700 | ||
| 701 | @defmac oref obj slot | ||
| 702 | @anchor{oref} | ||
| 703 | This macro retrieves the value stored in @var{obj} in the named | ||
| 704 | @var{slot}. Slot names are determined by @code{defclass} which | ||
| 705 | creates the slot. | ||
| 706 | |||
| 707 | This is a generalized variable that can be used with @code{setf} to | ||
| 708 | modify the value stored in @var{slot}. @xref{Generalized | ||
| 709 | Variables,,,elisp,GNU Emacs Lisp Reference Manual}. | ||
| 710 | @end defmac | ||
| 711 | |||
| 712 | @defmac oref-default class slot | ||
| 713 | @anchor{oref-default} | ||
| 714 | This macro returns the value of the class-allocated @var{slot} from | ||
| 715 | @var{class}. | ||
| 716 | |||
| 717 | This is a generalized variable that can be used with @code{setf} to | ||
| 718 | modify the value stored in @var{slot}. @xref{Generalized | ||
| 719 | Variables,,,elisp,GNU Emacs Lisp Reference Manual}. | ||
| 720 | @end defmac | ||
| 721 | |||
| 701 | @defmac oset object slot value | 722 | @defmac oset object slot value |
| 702 | This macro sets the value behind @var{slot} to @var{value} in | 723 | This macro sets the value behind @var{slot} to @var{value} in |
| 703 | @var{object}. It returns @var{value}. | 724 | @var{object}. It returns @var{value}. |
| @@ -716,17 +737,6 @@ changed, this can be arranged by simply executing this bit of code: | |||
| 716 | @end example | 737 | @end example |
| 717 | @end defmac | 738 | @end defmac |
| 718 | 739 | ||
| 719 | @defmac oref obj slot | ||
| 720 | @anchor{oref} | ||
| 721 | Retrieve the value stored in @var{obj} in the slot named by @var{slot}. | ||
| 722 | Slot is the name of the slot when created by @dfn{defclass}. | ||
| 723 | @end defmac | ||
| 724 | |||
| 725 | @defmac oref-default class slot | ||
| 726 | @anchor{oref-default} | ||
| 727 | Get the value of the class-allocated @var{slot} from @var{class}. | ||
| 728 | @end defmac | ||
| 729 | |||
| 730 | The following accessors are defined by CLOS to reference or modify | 740 | The following accessors are defined by CLOS to reference or modify |
| 731 | slot values, and use the previously mentioned set/ref routines. | 741 | slot values, and use the previously mentioned set/ref routines. |
| 732 | 742 | ||