diff options
| author | Stefan Monnier | 2015-03-19 10:35:52 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2015-03-19 10:35:52 -0400 |
| commit | 29f7f98b7c3755f8f9e9dcef60bd460794cf2104 (patch) | |
| tree | 865b12e6362218e3f4f35e926231ae02f9f1b8e5 | |
| parent | 50c117fe86d94719807cbe08353c032779b3b910 (diff) | |
| download | emacs-29f7f98b7c3755f8f9e9dcef60bd460794cf2104.tar.gz emacs-29f7f98b7c3755f8f9e9dcef60bd460794cf2104.zip | |
Fixes: debbugs:20141
* lisp/emacs-lisp/eieio.el (object-slots): Return slot names as before.
| -rw-r--r-- | lisp/ChangeLog | 42 | ||||
| -rw-r--r-- | lisp/emacs-lisp/eieio.el | 5 |
2 files changed, 27 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7c751f4e8e8..74a0988c98f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,23 +1,9 @@ | |||
| 1 | 2015-03-19 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2015-03-19 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * emacs-lisp/eieio.el (with-slots): Use macroexp-let2. | 3 | * emacs-lisp/eieio.el (object-slots): Return slot names as before |
| 4 | (object-class-fast): Change recommend replacement. | 4 | (bug#20141). |
| 5 | (eieio-object-class): Rewrite. | ||
| 6 | (slot-exists-p): Adjust to new slot representation. | ||
| 7 | (initialize-instance): Adjust to new slot representation. | ||
| 8 | (object-write): Adjust to new slot representation. | ||
| 9 | |||
| 10 | * emacs-lisp/eieio-opt.el (eieio--help-print-slot): New function | ||
| 11 | extracted from eieio-help-class-slots. | ||
| 12 | (eieio-help-class-slots): Use it. Adjust to new slot representation. | ||
| 13 | 5 | ||
| 14 | * emacs-lisp/eieio-datadebug.el (data-debug/eieio-insert-slots): | 6 | 2015-03-19 Stefan Monnier <monnier@iro.umontreal.ca> |
| 15 | Declare to silence warnings. | ||
| 16 | (data-debug-insert-object-button): Avoid `object-slots'. | ||
| 17 | (data-debug/eieio-insert-slots): Adjust to new slot representation. | ||
| 18 | |||
| 19 | * emacs-lisp/eieio-custom.el (eieio-object-value-create) | ||
| 20 | (eieio-object-value-get): Adjust to new slot representation. | ||
| 21 | 7 | ||
| 22 | EIEIO: Change class's representation to unify instance and class slots | 8 | EIEIO: Change class's representation to unify instance and class slots |
| 23 | * emacs-lisp/eieio-core.el (eieio--class): Change field names and order | 9 | * emacs-lisp/eieio-core.el (eieio--class): Change field names and order |
| @@ -41,7 +27,27 @@ | |||
| 41 | (eieio--class/struct-parents): New function. | 27 | (eieio--class/struct-parents): New function. |
| 42 | (eieio--class-precedence-bfs): Use it. | 28 | (eieio--class-precedence-bfs): Use it. |
| 43 | 29 | ||
| 44 | * emacs-lisp/eieio-compat.el (eieio--generic-static-symbol-specializers): | 30 | * emacs-lisp/eieio.el (with-slots): Use macroexp-let2. |
| 31 | (object-class-fast): Change recommend replacement. | ||
| 32 | (eieio-object-class): Rewrite. | ||
| 33 | (slot-exists-p): Adjust to new slot representation. | ||
| 34 | (initialize-instance): Adjust to new slot representation. | ||
| 35 | (object-write): Adjust to new slot representation. | ||
| 36 | |||
| 37 | * emacs-lisp/eieio-opt.el (eieio--help-print-slot): New function | ||
| 38 | extracted from eieio-help-class-slots. | ||
| 39 | (eieio-help-class-slots): Use it. Adjust to new slot representation. | ||
| 40 | |||
| 41 | * emacs-lisp/eieio-datadebug.el (data-debug/eieio-insert-slots): | ||
| 42 | Declare to silence warnings. | ||
| 43 | (data-debug-insert-object-button): Avoid `object-slots'. | ||
| 44 | (data-debug/eieio-insert-slots): Adjust to new slot representation. | ||
| 45 | |||
| 46 | * emacs-lisp/eieio-custom.el (eieio-object-value-create) | ||
| 47 | (eieio-object-value-get): Adjust to new slot representation. | ||
| 48 | |||
| 49 | * emacs-lisp/eieio-compat.el | ||
| 50 | (eieio--generic-static-symbol-specializers): | ||
| 45 | Extract from eieio--generic-static-symbol-generalizer. | 51 | Extract from eieio--generic-static-symbol-generalizer. |
| 46 | (eieio--generic-static-symbol-generalizer): Use it. | 52 | (eieio--generic-static-symbol-generalizer): Use it. |
| 47 | 53 | ||
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 4ba67693175..8d76df874e5 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el | |||
| @@ -453,10 +453,11 @@ The CLOS function `class-direct-subclasses' is aliased to this function." | |||
| 453 | (mapcar #'identity (eieio--class-slots class))) | 453 | (mapcar #'identity (eieio--class-slots class))) |
| 454 | 454 | ||
| 455 | (defun object-slots (obj) | 455 | (defun object-slots (obj) |
| 456 | "Return list of slots available in OBJ." | 456 | "Return list of slot names available in OBJ." |
| 457 | (declare (obsolete eieio-class-slots "25.1")) | 457 | (declare (obsolete eieio-class-slots "25.1")) |
| 458 | (cl-check-type obj eieio-object) | 458 | (cl-check-type obj eieio-object) |
| 459 | (eieio-class-slots (eieio--object-class obj))) | 459 | (mapcar #'cl--slot-descriptor-name |
| 460 | (eieio-class-slots (eieio--object-class obj)))) | ||
| 460 | 461 | ||
| 461 | (defun eieio--class-slot-initarg (class slot) | 462 | (defun eieio--class-slot-initarg (class slot) |
| 462 | "Fetch from CLASS, SLOT's :initarg." | 463 | "Fetch from CLASS, SLOT's :initarg." |