]> git.eshelyaron.com Git - emacs.git/commit
Backward compatibility with pre-existing struct instances. scratch/record
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 24 Mar 2017 13:21:52 +0000 (09:21 -0400)
committerLars Brinkhoff <lars@nocrew.org>
Thu, 30 Mar 2017 16:31:27 +0000 (18:31 +0200)
commit390612eb7ab8ccf0792fda7c48b7056c5cda9b06
tree71766520a963d9c970cd72e8a2022302661a9f94
parent43cb754a3109ac9afaeab1f08e35673b078a7a09
Backward compatibility with pre-existing struct instances.

* lisp/emacs-lisp/cl-lib.el (cl--old-struct-type-of): New function.
(cl-old-struct-compat-mode): New minor mode.

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Pass `record' to
cl-struct-define to signal use of record objects.

* lisp/emacs-lisp/cl-preloaded.el (cl--struct-get-class,
cl-struct-define): Enable legacy defstruct compatibility.

* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-old-struct,
old-struct): New tests.

* doc/lispref/elisp.texi, doc/lispref/records.texi: Document
`old-struct-compat'.
doc/lispref/elisp.texi
doc/lispref/records.texi
lisp/emacs-lisp/cl-lib.el
lisp/emacs-lisp/cl-macs.el
lisp/emacs-lisp/cl-preloaded.el
test/lisp/emacs-lisp/cl-lib-tests.el