Skip to content

Record Functions

Function: recordp object

This function returns t if object is a record.

emacs-lisp
(recordp #s(a))
t

Function: record type &rest objects

This function creates and returns a record whose type is type and remaining slots are the rest of the arguments, objects.

emacs-lisp
(record 'foo 23 [bar baz] "rats")
#s(foo 23 [bar baz] "rats")

Function: make-record type length object

This function returns a new record with type type and length more slots, each initialized to object.

emacs-lisp
(setq sleepy (make-record 'foo 9 'Z))
#s(foo Z Z Z Z Z Z Z Z Z)

To copy trees consisting of records, vectors and conses (lists), use copy-tree with its optional second argument non-nil. See copy-tree.