From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: change in call-next-method Date: Sun, 03 Jan 2016 05:37:01 -0600 Message-ID: <86poxiki76.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1451821076 5309 80.91.229.3 (3 Jan 2016 11:37:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jan 2016 11:37:56 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 03 12:37:45 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aFgyl-0001LG-UW for ged-emacs-devel@m.gmane.org; Sun, 03 Jan 2016 12:37:44 +0100 Original-Received: from localhost ([::1]:41334 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFgyj-0000qo-Fx for ged-emacs-devel@m.gmane.org; Sun, 03 Jan 2016 06:37:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFgyg-0000qe-Ux for emacs-devel@gnu.org; Sun, 03 Jan 2016 06:37:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aFgyd-0006yq-PF for emacs-devel@gnu.org; Sun, 03 Jan 2016 06:37:38 -0500 Original-Received: from gproxy6-pub.mail.unifiedlayer.com ([67.222.39.168]:41901) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1aFgyd-0006xB-IP for emacs-devel@gnu.org; Sun, 03 Jan 2016 06:37:35 -0500 Original-Received: (qmail 5069 invoked by uid 0); 3 Jan 2016 11:37:20 -0000 Original-Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy6.mail.unifiedlayer.com with SMTP; 3 Jan 2016 11:37:20 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw3 with id 1Wd81s0072UdiVW01WdBVi; Sun, 03 Jan 2016 11:37:18 -0700 X-Authority-Analysis: v=2.1 cv=bej4Do/B c=1 sm=1 tr=0 a=CQdxDb2CKd3SRg4I0/XZPQ==:117 a=CQdxDb2CKd3SRg4I0/XZPQ==:17 a=DsvgjBjRAAAA:8 a=f5113yIGAAAA:8 a=9i_RQKNPAAAA:8 a=hEr_IkYJT6EA:10 a=x_XPkuGwIRMA:10 a=7aQ_Q-yQQ-AA:10 a=vIIO-aeidzKZdSPgCtQA:9 Original-Received: from [76.218.37.33] (port=64369 helo=TAKVER2) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1aFgyE-0001qN-Bx for emacs-devel@gnu.org; Sun, 03 Jan 2016 04:37:10 -0700 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) X-Identified-User: {2442:host114.hostmonster.com:stephele:stephe-leake.org} {sentby:smtp auth 76.218.37.33 authed with stephen_leake@stephe-leake.org} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 67.222.39.168 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:197436 Archived-At: 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