7.2 向后兼容

使用旧版 cl-defstruct 编译、且未使用记录(record)的代码,在新版 Emacs 中运行时可能会出现问题。为缓解这一情况,Emacs 会检测是否使用了旧版 cl-defstruct,并启用一种兼容模式:在该模式下,type-of 会把旧版结构体对象当作记录来处理。

Function: cl-old-struct-compat-mode arg

如果 arg 为正数,则启用对旧版结构体的向后兼容。