* lisp/emacs-lisp/cl-lib.el (cl-old-struct-compat-mode): Mark as obsolete
* lisp/emacs-lisp/cl-preloaded.el: Emit a message before enabling `cl-old-struct-compat-mode`. See bug#63282.
This commit is contained in:
parent
98f7665677
commit
2e7af2fc53
3 changed files with 7 additions and 1 deletions
3
etc/NEWS
3
etc/NEWS
|
@ -882,6 +882,9 @@ Use 'define-minor-mode' and 'define-globalized-minor-mode' instead.
|
|||
See the "(elisp) Porting Old Advice" node for help converting them
|
||||
to use 'advice-add' or 'define-advice' instead.
|
||||
|
||||
** 'cl-old-struct-compat-mode' is marked as obsolete.
|
||||
You may need to recompile our code if it was compiled with Emacs<24.3.
|
||||
|
||||
+++
|
||||
** New macro 'static-if' for conditional evaluation of code.
|
||||
This macro hides a form from the evaluator or byte-compiler based on a
|
||||
|
|
|
@ -571,6 +571,7 @@ of record objects."
|
|||
(advice-add 'type-of :around #'cl--old-struct-type-of))
|
||||
(t
|
||||
(advice-remove 'type-of #'cl--old-struct-type-of))))
|
||||
(make-obsolete 'cl-old-struct-compat-mode nil "30.1")
|
||||
|
||||
(defun cl-constantly (value)
|
||||
"Return a function that takes any number of arguments, but returns VALUE."
|
||||
|
|
|
@ -159,7 +159,9 @@ supertypes from the most specific to least specific.")
|
|||
(cl-check-type name (satisfies cl--struct-name-p))
|
||||
(unless type
|
||||
;; Legacy defstruct, using tagged vectors. Enable backward compatibility.
|
||||
(cl-old-struct-compat-mode 1))
|
||||
(with-suppressed-warnings ((obsolete cl-old-struct-compat-mode))
|
||||
(message "cl-old-struct-compat-mode is obsolete!")
|
||||
(cl-old-struct-compat-mode 1)))
|
||||
(if (eq type 'record)
|
||||
;; Defstruct using record objects.
|
||||
(setq type nil))
|
||||
|
|
Loading…
Add table
Reference in a new issue