• Stefan Monnier's avatar
    Backward compatibility with pre-existing struct instances. · 390612eb
    Stefan Monnier authored
    * 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'.
    390612eb
records.texi 3.2 KB