summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-12-27 17:24:52 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2021-12-27 17:24:52 -0500
commit13ef21e84a8c4af0cd9e7a5f9c56a359b1344fe9 (patch)
tree3c8815e3acd5b09249e91e5a23e1df73134fd0cc
parent0fb55c8776d75d08da626f84ca5570da7e95391e (diff)
downloademacs-13ef21e84a8c4af0cd9e7a5f9c56a359b1344fe9.tar.gz
emacs-13ef21e84a8c4af0cd9e7a5f9c56a359b1344fe9.tar.bz2
emacs-13ef21e84a8c4af0cd9e7a5f9c56a359b1344fe9.zip
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.
-rw-r--r--doc/misc/ede.texi2
-rw-r--r--doc/misc/srecode.texi6
-rw-r--r--etc/NEWS8
-rw-r--r--test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el1
-rw-r--r--test/lisp/emacs-lisp/eieio-tests/eieio-tests.el1
-rw-r--r--test/manual/cedet/tests/test.el4
6 files changed, 16 insertions, 6 deletions
diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi
index 1d8235a348e..1ed8ff24607 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 16a348e0f8f..8e55ac2971c 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 e0920e84e2e..01e1a8e940b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -88,6 +88,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 bc89f23b582..a5349b95582 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 3ed00f49d14..abb12e68333 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 34c03619f88..246a856665b 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