1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-09 07:40:39 -08:00
emacs/test/lisp/emacs-lisp
Lars Brinkhoff a2c3343029 Add record objects with user-defined types.
* src/alloc.c (allocate_record): New function.
(Fmake_record, Frecord, Fcopy_record): New functions.
(syms_of_alloc): defsubr them.
(purecopy): Work with records.

* src/data.c (Ftype_of): Return slot 0 for record objects, or type
name if record's type holds class.
(Frecordp): New function.
(syms_of_data): defsubr it.  Define `Qrecordp'.
(Faref, Faset): Work with records.

* src/fns.c (Flength): Work with records.

* src/lisp.h (prec_type): Add PVEC_RECORD.
(RECORDP, CHECK_RECORD, CHECK_RECORD_TYPE): New functions.

* src/lread.c (read1): Add syntax for records.

* src/print.c (PRINT_CIRCLE_CANDIDATE_P): Add RECORDP.
(print_object): Add syntax for records.

* test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-2):
New test.

* test/src/alloc-tests.el (record-1, record-2, record-3):
New tests.

* doc/lispref/elisp.texi, doc/lispref/objects.texi,
doc/lispref/records.texi: Add documentation 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 * test/lisp/emacs-lisp/cl-lib-tests.el: Improve symbol-macrolet tests 2017-04-01 12:11:07 -04: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