]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix EIEIO tests to account for eieio-compat move
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 27 Dec 2021 22:24:52 +0000 (17:24 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 27 Dec 2021 22:24:52 +0000 (17:24 -0500)
* 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
doc/misc/srecode.texi
etc/NEWS
test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
test/manual/cedet/tests/test.el

index 1d8235a348e35dc9bad0d361101eff9f7ed7e6fa..1ed8ff2460798f96dae3ba3d305fc5bd629c25d0 100644 (file)
@@ -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 "))
index 16a348e0f8fb66095cab6108264b29ae894639a3..8e55ac2971c7ec34ad1897d311d3287b89053745 100644 (file)
@@ -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."
index e0920e84e2e3eaa6bf46c6991630396a7097d00a..01e1a8e940b0216f41ec5769769f6be0a3e39dc1 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -87,6 +87,14 @@ time.
 \f
 * 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.
index bc89f23b582ef800598024a332a56ce21d5ee926..a5349b95582544fd5d5be527d05d7e1279ce721d 100644 (file)
@@ -55,6 +55,7 @@
 ;;; Code:
 
 (require 'eieio)
+(require 'eieio-compat)
 (require 'ert)
 
 (defvar eieio-test-method-order-list nil
index 3ed00f49d145e5d6ff3605c86be49a9cf60c61e7..abb12e68333b126ce87d9849e5f56897a824e6d0 100644 (file)
@@ -27,6 +27,7 @@
 (require 'ert)
 (require 'eieio)
 (require 'eieio-base)
+(require 'eieio-compat)
 (require 'eieio-opt)
 
 (eval-when-compile (require 'cl-lib))
index 34c03619f8879f111d68f38e5e8b92c84b9176a6..246a856665bc706d20f1108ee3652dab1793eaf5 100644 (file)
 
 ;;; 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