]> git.eshelyaron.com Git - emacs.git/commit
* lisp/emacs-lisp/eieio*.el: Remove "name" field of objects
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 23 Dec 2014 03:05:46 +0000 (22:05 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 23 Dec 2014 03:05:46 +0000 (22:05 -0500)
commitee93d7ad4291a0946efe3197481cfbeff92f29b8
tree4ff0ca7149c5bead965c4e3e49d104af1cf42e1c
parentd4a12e7a9a46bbff2f9c4d59ecc284621634a2e8
* lisp/emacs-lisp/eieio*.el: Remove "name" field of objects

* lisp/emacs-lisp/eieio-base.el (clone) <eieio-instance-inheritor>:
Use call-next-method.
(eieio-constructor): Rename from `constructor'.
(eieio-persistent-convert-list-to-object): Drop objname.
(eieio-persistent-validate/fix-slot-value): Don't hardcode
eieio--object-num-slots.
(eieio-named): Use a normal slot.
(slot-missing) <eieio-named>: Remove.
(eieio-object-name-string, eieio-object-set-name-string, clone)
<eieio-named>: New methods.

* lisp/emacs-lisp/eieio-core.el (eieio--defalias): Follow aliases.
(eieio--object): Remove `name' field.
(eieio-defclass): Adjust to new convention where constructors don't
take an "object name" any more.
(eieio--defgeneric-init-form, eieio--defmethod): Follow aliases.
(eieio-validate-slot-value, eieio-oset-default)
(eieio-slot-name-index): Don't hardcode eieio--object-num-slots.
(eieio-generic-call-primary-only): Simplify.

* lisp/emacs-lisp/eieio-custom.el (eieio-widget-test): Remove dummy arg.
(eieio-object-value-get): Use eieio-object-set-name-string.

* lisp/emacs-lisp/eieio.el (make-instance): Simplify by not adding an object
name argument.
(eieio-object-name): Use eieio-object-name-string.
(eieio--object-names): New const.
(eieio-object-name-string, eieio-object-set-name-string): Re-implement
using a hashtable rather than a built-in slot.
(eieio-constructor): Rename from `constructor'.  Remove `newname' arg.
(clone): Don't mess with the object's "name".

* test/automated/eieio-test-persist.el (persistent-with-objs-slot-subs):
The type FOO-child is the same as FOO.

* test/automated/eieio-tests.el: Remove dummy object names.
lisp/ChangeLog
lisp/emacs-lisp/eieio-base.el
lisp/emacs-lisp/eieio-core.el
lisp/emacs-lisp/eieio-custom.el
lisp/emacs-lisp/eieio.el
test/automated/eieio-test-methodinvoke.el
test/automated/eieio-test-persist.el
test/automated/eieio-tests.el