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:38:40 -0600 Message-ID: <86h9iuc2o4.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1451821221 7022 80.91.229.3 (3 Jan 2016 11:40:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jan 2016 11:40:21 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 03 12:40:10 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 1aFh13-0003si-UX for ged-emacs-devel@m.gmane.org; Sun, 03 Jan 2016 12:40:06 +0100 Original-Received: from localhost ([::1]:41338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFh13-0001PK-5B for ged-emacs-devel@m.gmane.org; Sun, 03 Jan 2016 06:40:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFh10-0001Ot-1m for emacs-devel@gnu.org; Sun, 03 Jan 2016 06:40:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aFh0w-0007Ww-Ky for emacs-devel@gnu.org; Sun, 03 Jan 2016 06:40:01 -0500 Original-Received: from gproxy1-pub.mail.unifiedlayer.com ([69.89.25.95]:35059) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1aFh0w-0007Wp-DN for emacs-devel@gnu.org; Sun, 03 Jan 2016 06:39:58 -0500 Original-Received: (qmail 9649 invoked by uid 0); 3 Jan 2016 11:39:56 -0000 Original-Received: from unknown (HELO cmgw4) (10.0.90.85) by gproxy1.mail.unifiedlayer.com with SMTP; 3 Jan 2016 11:39:56 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw4 with id 1Pfo1s00b2UdiVW01PfrXa; Sun, 03 Jan 2016 04:39:56 -0700 X-Authority-Analysis: v=2.1 cv=IekUBwaa 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=64372 helo=TAKVER2) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1aFh0m-0002c7-N3 for emacs-devel@gnu.org; Sun, 03 Jan 2016 04:39:48 -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: 69.89.25.95 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:197437 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