Function: cl-old-struct-compat-mode
cl-old-struct-compat-mode is an autoloaded, interactive and
byte-compiled function defined in cl-lib.el.gz.
This command is obsolete since 30.1.
Signature
(cl-old-struct-compat-mode &optional ARG)
Documentation
Enable backward compatibility with old-style structs.
This can be needed when using code byte-compiled using the old
macro-expansion of cl-defstruct that used vectors objects instead
of record objects.
This is a global minor mode. If called interactively, toggle the
Cl-Old-Struct-Compat mode mode. If the prefix argument is positive,
enable the mode, and if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate (default-value \=cl-old-struct-compat-mode)'.
The mode's hook is called both when the mode is enabled and when it is disabled.
Probably introduced at or before Emacs version 30.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/cl-lib.el.gz
;;;###autoload
(define-minor-mode cl-old-struct-compat-mode
"Enable backward compatibility with old-style structs.
This can be needed when using code byte-compiled using the old
macro-expansion of `cl-defstruct' that used vectors objects instead
of record objects."
:global t
:group 'tools
(cond
(cl-old-struct-compat-mode
(advice-add 'type-of :around #'cl--old-struct-type-of))
(t
(advice-remove 'type-of #'cl--old-struct-type-of))))