emacs/test/lisp/emacs-lisp
Lars Brinkhoff 0565482838 Make cl-defstruct use records.
* lisp/emacs-lisp/cl-extra.el (cl--describe-class)
(cl--describe-class-slots): Use the new `type-of'.

* lisp/emacs-lisp/cl-generic.el (cl--generic-struct-tag): Use type-of.
(cl--generic-struct-specializers): Adjust to new tag.

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): When type is nil, use records.
Use the type symbol as the tag.  Use copy-record to copy structs.
(cl--defstruct-predicate): New function.
(cl--pcase-mutually-exclusive-p): Use it.
(cl-struct-sequence-type): Can now return `record'.

* lisp/emacs-lisp/cl-preloaded.el (cl--make-slot-desc): Adjust ad-hoc
code to new format.
(cl--struct-register-child): Work with records.
(cl-struct-define): Don't touch the tag's symbol-value and
symbol-function slots when we use the type as tag.

* lisp/emacs-lisp/cl-print.el (cl-print-object): Adjust to new tag.

* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-defstruct-record):
New test.

* doc/lispref/records.texi, doc/misc/cl.texi: Update for records.
2017-04-04 08:23:46 +02:00
..
eieio-tests
package-resources Don't use IP 0.0.0.0 for package test server (Bug#22582) 2017-02-25 12:56:09 -05:00
testcover-resources Add tests for lisp/emacs-lisp/testcover.el 2017-02-04 11:43:50 +02:00
benchmark-tests.el Use lexical binding in benchmark.el 2017-03-03 18:26:30 +09:00
bytecomp-tests.el bytecomp-tests.el: Store all test forms in one constant. 2017-02-15 21:12:44 +05:30
checkdoc-tests.el
cl-extra-tests.el Prevent for consing in cl-mapc and cl-mapl 2017-02-27 16:32:10 +09:00
cl-generic-tests.el
cl-lib-tests.el Make cl-defstruct use records. 2017-04-04 08:23:46 +02:00
cl-print-tests.el Add record objects with user-defined types. 2017-04-04 08:23:46 +02:00
cl-seq-tests.el test/*.el: Avoid byte-compiler warnings 2017-01-28 04:40:36 +01:00
ert-tests.el
ert-x-tests.el
generator-tests.el
let-alist-tests.el test/*.el: Avoid byte-compiler warnings 2017-01-28 04:40:36 +01:00
lisp-mode-tests.el * test/lisp/emacs-lisp/lisp-mode-tests.el (indent-subsexp): Test for Bug#26187 2017-03-21 20:45:32 -04:00
lisp-tests.el
map-tests.el
nadvice-tests.el
package-tests.el Don't use IP 0.0.0.0 for package test server (Bug#22582) 2017-02-25 12:56:09 -05:00
pcase-tests.el
pp-tests.el Switch pp.el to lexical binding 2017-03-02 23:03:20 -05:00
regexp-opt-tests.el
ring-tests.el
rx-tests.el
seq-tests.el
subr-x-tests.el
tabulated-list-test.el
testcover-tests.el Add tests for lisp/emacs-lisp/testcover.el 2017-02-04 11:43:50 +02:00
thunk-tests.el
timer-tests.el