diff options
| author | Stefan Monnier | 2023-09-05 12:56:13 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2023-09-05 12:56:24 -0400 |
| commit | 2e7af2fc5304b9dfda944ced67b366e4576a1035 (patch) | |
| tree | 6e097dc097745db8dc86bd5f8c46b48e628daecd | |
| parent | 98f7665677b6b6964344a82ee60fc698afda1018 (diff) | |
| download | emacs-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/NEWS | 3 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-lib.el | 1 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-preloaded.el | 4 |
3 files changed, 7 insertions, 1 deletions
| @@ -882,6 +882,9 @@ Use 'define-minor-mode' and 'define-globalized-minor-mode' instead. | |||
| 882 | See the "(elisp) Porting Old Advice" node for help converting them | 882 | See the "(elisp) Porting Old Advice" node for help converting them |
| 883 | to use 'advice-add' or 'define-advice' instead. | 883 | to use 'advice-add' or 'define-advice' instead. |
| 884 | 884 | ||
| 885 | ** 'cl-old-struct-compat-mode' is marked as obsolete. | ||
| 886 | You 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. |
| 887 | This macro hides a form from the evaluator or byte-compiler based on a | 890 | This 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)) |