[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 13ef21e84a: Fix EIEIO tests to account for eieio-compat move
From: |
Stefan Monnier |
Subject: |
master 13ef21e84a: Fix EIEIO tests to account for eieio-compat move |
Date: |
Mon, 27 Dec 2021 17:25:01 -0500 (EST) |
branch: master
commit 13ef21e84a8c4af0cd9e7a5f9c56a359b1344fe9
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
Fix EIEIO tests to account for eieio-compat move
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el:
Require `eieio-compat` explicitly.
* test/manual/cedet/tests/test.el (a-method, a-generic):
* doc/misc/srecode.texi (Compound Dictionary Values):
* doc/misc/ede.texi (ede-generic-project): Update sample code to use
cl-generic syntax.
---
doc/misc/ede.texi | 2 +-
doc/misc/srecode.texi | 6 +++---
etc/NEWS | 8 ++++++++
test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el | 1 +
test/lisp/emacs-lisp/eieio-tests/eieio-tests.el | 1 +
test/manual/cedet/tests/test.el | 4 ++--
6 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi
index 1d8235a348..1ed8ff2460 100644
--- a/doc/misc/ede.texi
+++ b/doc/misc/ede.texi
@@ -958,7 +958,7 @@ The example for Makefiles looks like this:
((buildfile :initform "Makefile"))
"Generic Project for makefiles.")
-(defmethod ede-generic-setup-configuration ((proj
ede-generic-makefile-project) config)
+(cl-defmethod ede-generic-setup-configuration ((proj
ede-generic-makefile-project) config)
"Set up a configuration for Make."
(oset config build-command "make -k")
(oset config debug-command "gdb "))
diff --git a/doc/misc/srecode.texi b/doc/misc/srecode.texi
index 16a348e0f8..8e55ac2971 100644
--- a/doc/misc/srecode.texi
+++ b/doc/misc/srecode.texi
@@ -1070,9 +1070,9 @@ Here is an example of wrapping a semantic tag in a
compound value:
"Wrap up a collection of semantic tag information.
This class will be used to derive dictionary values.")
-(defmethod srecode-compound-toString((cp srecode-semantic-tag)
- function
- dictionary)
+(cl-defmethod srecode-compound-toString ((cp srecode-semantic-tag)
+ function
+ dictionary)
"Convert the compound dictionary value CP to a string.
If FUNCTION is non-nil, then FUNCTION is somehow applied to an
aspect of the compound value."
diff --git a/etc/NEWS b/etc/NEWS
index e0920e84e2..01e1a8e940 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -87,6 +87,14 @@ time.
* Incompatible changes in Emacs 29.1
+---
+** Support for old EIEIO functions not is autoloaded any more
+You need to explicitly (require 'eieio-compat) if you need to use
+the functions `defmethod` and `defgeneric` (which have been made
+obsolete in Emacs-25 with `cl-defmethod` and `cl-defgeneric`).
+Similarly files that were compiled with an old EIEIO (Emacs<25),
+will usually need (require 'eieio-compat).
+
---
** 'C-x 8 .' has been moved to 'C-x 8 . .'.
This is to open up the 'C-x 8 .' map to bind further characters there.
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
b/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
index bc89f23b58..a5349b9558 100644
--- a/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
+++ b/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
@@ -55,6 +55,7 @@
;;; Code:
(require 'eieio)
+(require 'eieio-compat)
(require 'ert)
(defvar eieio-test-method-order-list nil
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
index 3ed00f49d1..abb12e6833 100644
--- a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
+++ b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
@@ -27,6 +27,7 @@
(require 'ert)
(require 'eieio)
(require 'eieio-base)
+(require 'eieio-compat)
(require 'eieio-opt)
(eval-when-compile (require 'cl-lib))
diff --git a/test/manual/cedet/tests/test.el b/test/manual/cedet/tests/test.el
index 34c03619f8..246a856665 100644
--- a/test/manual/cedet/tests/test.el
+++ b/test/manual/cedet/tests/test.el
@@ -63,11 +63,11 @@
;;; Methods
;;
-(defmethod a-method ((obj some-class) &optional arg2)
+(cl-defmethod a-method ((obj some-class) &optional arg2)
"Doc String for a method."
(call-next-method))
-(defgeneric a-generic (arg1 arg2)
+(cl-defgeneric a-generic (arg1 arg2)
"General description of a-generic.")
;;; Advice
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 13ef21e84a: Fix EIEIO tests to account for eieio-compat move,
Stefan Monnier <=