summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/eieio.el
diff options
context:
space:
mode:
authorBasil L. Contovounesios <contovob@tcd.ie>2020-06-03 17:35:59 +0100
committerBasil L. Contovounesios <contovob@tcd.ie>2020-06-06 17:24:00 +0100
commit8bcc781bc762b4082cfd678b88938e3d03465d91 (patch)
treec633ddabe6c442953e08f60eff889966d5214703 /lisp/emacs-lisp/eieio.el
parentacd2cb28ef63188bff31fc167ab007a051f99c17 (diff)
downloademacs-8bcc781bc762b4082cfd678b88938e3d03465d91.tar.gz
emacs-8bcc781bc762b4082cfd678b88938e3d03465d91.tar.bz2
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 'lisp/emacs-lisp/eieio.el')
-rw-r--r--lisp/emacs-lisp/eieio.el14
1 files changed, 2 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index ee5dd2cccdb..b75410ee220 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -513,8 +513,7 @@ The CLOS function `class-direct-subclasses' is aliased to this function."
"Set the value in OBJ for slot SLOT to VALUE.
SLOT is the slot name as specified in `defclass' or the tag created
with in the :initarg slot. VALUE can be any Lisp object."
- (declare (obsolete "use (setf (oref ..) ..) instead" "28.1")
- (debug (form symbolp form)))
+ (declare (debug (form symbolp form)))
`(eieio-oset ,obj (quote ,slot) ,value))
(defmacro oset-default (class slot value)
@@ -522,8 +521,7 @@ with in the :initarg slot. VALUE can be any Lisp object."
The default value is usually set with the :initform tag during class
creation. This allows users to change the default behavior of classes
after they are created."
- (declare (obsolete "use (setf (oref-default ..) ..) instead" "28.1")
- (debug (form symbolp form)))
+ (declare (debug (form symbolp form)))
`(eieio-oset-default ,class (quote ,slot) ,value))
;;; CLOS queries into classes and slots
@@ -647,14 +645,6 @@ If SLOT is unbound, do nothing."
nil
(eieio-oset object slot (delete item (eieio-oref object slot)))))
-;;; Here are some CLOS items that need the CL package
-;;
-
-;; FIXME: Shouldn't this be a more complex gv-expander which extracts the
-;; common code between oref and oset, so as to reduce the redundant work done
-;; in (push foo (oref bar baz)), like we do for the `nth' expander?
-(gv-define-simple-setter eieio-oref eieio-oset)
-
;;;
;; We want all objects created by EIEIO to have some default set of