aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorBasil L. Contovounesios2020-06-03 17:35:59 +0100
committerBasil L. Contovounesios2020-06-06 17:24:00 +0100
commit8bcc781bc762b4082cfd678b88938e3d03465d91 (patch)
treec633ddabe6c442953e08f60eff889966d5214703 /doc
parentacd2cb28ef63188bff31fc167ab007a051f99c17 (diff)
downloademacs-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.texi32
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
698referencing vectors (@pxref{Vectors,,,elisp,GNU Emacs Lisp Reference 698referencing vectors (@pxref{Vectors,,,elisp,GNU Emacs Lisp Reference
699Manual}). 699Manual}).
700 700
701@defmac oref obj slot
702@anchor{oref}
703This macro retrieves the value stored in @var{obj} in the named
704@var{slot}. Slot names are determined by @code{defclass} which
705creates the slot.
706
707This is a generalized variable that can be used with @code{setf} to
708modify the value stored in @var{slot}. @xref{Generalized
709Variables,,,elisp,GNU Emacs Lisp Reference Manual}.
710@end defmac
711
712@defmac oref-default class slot
713@anchor{oref-default}
714This macro returns the value of the class-allocated @var{slot} from
715@var{class}.
716
717This is a generalized variable that can be used with @code{setf} to
718modify the value stored in @var{slot}. @xref{Generalized
719Variables,,,elisp,GNU Emacs Lisp Reference Manual}.
720@end defmac
721
701@defmac oset object slot value 722@defmac oset object slot value
702This macro sets the value behind @var{slot} to @var{value} in 723This 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}
721Retrieve the value stored in @var{obj} in the slot named by @var{slot}.
722Slot 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}
727Get the value of the class-allocated @var{slot} from @var{class}.
728@end defmac
729
730The following accessors are defined by CLOS to reference or modify 740The following accessors are defined by CLOS to reference or modify
731slot values, and use the previously mentioned set/ref routines. 741slot values, and use the previously mentioned set/ref routines.
732 742