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.
This commit is contained in:
Stefan Monnier 2021-12-27 17:24:52 -05:00
parent 0fb55c8776
commit 13ef21e84a
6 changed files with 16 additions and 6 deletions

View 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 "))

View 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."

View file

@ -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.

View file

@ -55,6 +55,7 @@
;;; Code:
(require 'eieio)
(require 'eieio-compat)
(require 'ert)
(defvar eieio-test-method-order-list nil

View file

@ -27,6 +27,7 @@
(require 'ert)
(require 'eieio)
(require 'eieio-base)
(require 'eieio-compat)
(require 'eieio-opt)
(eval-when-compile (require 'cl-lib))

View file

@ -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