Variable: cl-old-struct-compat-mode

cl-old-struct-compat-mode is a customizable variable defined in cl-lib.el.gz.

Value

nil

Documentation

Non-nil if Cl-Old-Struct-Compat mode is enabled.

See the cl-old-struct-compat-mode(var)/cl-old-struct-compat-mode(fun) command for a description of this minor mode. Setting this variable directly does not take effect; either customize it (see the info node (emacs)Easy Customization) or call the function cl-old-struct-compat-mode(var)/cl-old-struct-compat-mode(fun).

View in manual

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))))