aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2023-09-05 12:56:13 -0400
committerStefan Monnier2023-09-05 12:56:24 -0400
commit2e7af2fc5304b9dfda944ced67b366e4576a1035 (patch)
tree6e097dc097745db8dc86bd5f8c46b48e628daecd
parent98f7665677b6b6964344a82ee60fc698afda1018 (diff)
downloademacs-2e7af2fc5304b9dfda944ced67b366e4576a1035.tar.gz
emacs-2e7af2fc5304b9dfda944ced67b366e4576a1035.zip
* 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.
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/emacs-lisp/cl-lib.el1
-rw-r--r--lisp/emacs-lisp/cl-preloaded.el4
3 files changed, 7 insertions, 1 deletions
diff --git a/etc/NEWS b/etc/NEWS
index fbb13254e64..a68e67e0694 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -882,6 +882,9 @@ Use 'define-minor-mode' and 'define-globalized-minor-mode' instead.
882See the "(elisp) Porting Old Advice" node for help converting them 882See the "(elisp) Porting Old Advice" node for help converting them
883to use 'advice-add' or 'define-advice' instead. 883to use 'advice-add' or 'define-advice' instead.
884 884
885** 'cl-old-struct-compat-mode' is marked as obsolete.
886You may need to recompile our code if it was compiled with Emacs<24.3.
887
885+++ 888+++
886** New macro 'static-if' for conditional evaluation of code. 889** New macro 'static-if' for conditional evaluation of code.
887This macro hides a form from the evaluator or byte-compiler based on a 890This macro hides a form from the evaluator or byte-compiler based on a
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index 83396dabc1a..f4c1ac85b13 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -571,6 +571,7 @@ of record objects."
571 (advice-add 'type-of :around #'cl--old-struct-type-of)) 571 (advice-add 'type-of :around #'cl--old-struct-type-of))
572 (t 572 (t
573 (advice-remove 'type-of #'cl--old-struct-type-of)))) 573 (advice-remove 'type-of #'cl--old-struct-type-of))))
574(make-obsolete 'cl-old-struct-compat-mode nil "30.1")
574 575
575(defun cl-constantly (value) 576(defun cl-constantly (value)
576 "Return a function that takes any number of arguments, but returns VALUE." 577 "Return a function that takes any number of arguments, but returns VALUE."
diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el
index f410270d340..676326980aa 100644
--- a/lisp/emacs-lisp/cl-preloaded.el
+++ b/lisp/emacs-lisp/cl-preloaded.el
@@ -159,7 +159,9 @@ supertypes from the most specific to least specific.")
159 (cl-check-type name (satisfies cl--struct-name-p)) 159 (cl-check-type name (satisfies cl--struct-name-p))
160 (unless type 160 (unless type
161 ;; Legacy defstruct, using tagged vectors. Enable backward compatibility. 161 ;; Legacy defstruct, using tagged vectors. Enable backward compatibility.
162 (cl-old-struct-compat-mode 1)) 162 (with-suppressed-warnings ((obsolete cl-old-struct-compat-mode))
163 (message "cl-old-struct-compat-mode is obsolete!")
164 (cl-old-struct-compat-mode 1)))
163 (if (eq type 'record) 165 (if (eq type 'record)
164 ;; Defstruct using record objects. 166 ;; Defstruct using record objects.
165 (setq type nil)) 167 (setq type nil))