[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
change in call-next-method
From: |
Stephen Leake |
Subject: |
change in call-next-method |
Date: |
Sun, 03 Jan 2016 05:38:40 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) |
I'm updating JDEE to Emacs 25. It has several functions like this:
(cl-defmethod initialize-instance ((this jdee-jddocset) &rest rest)
(apply 'call-next-method rest)
(unless (oref this description)
(oset this :description
(if (oref this jdkp)
(format "JDK %s Javadoc" (oref this version))
(let ((file (jdee-url-file (oref this url))))
(if (string-match ".*\\/\\(.*?\\)\\/doc\\/api" file)
(match-string 1 file)
(jdee-url-name (oref this url))))))))
This breaks if I just change call-next-method to cl-call-next-method. In
Emacs 24, `call-next-method' is a defun that does the right thing here
(calls the default superclass init). In Emacs 25, cl-call-next-method is
a defun that throws an error; cl-defmethod is supposed to replace plain
calls to cl-call-next-method with an in-line call to the appropriate
method.
As far as I can tell, the only reason for the call to call-next-method
is to process the constructor args in `rest', storing them in the
appropriate slots.
What is the right way to do that in Emacs 25? I don't see anything in
the CL manual about this, and I can't find the relevant code by reading
the implementations of cl-defmethod or cl-generic.
--
-- Stephe
- change in call-next-method,
Stephen Leake <=