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: 'head' specializer for cl-defmethod? Date: Tue, 28 Jul 2015 07:06:00 -0500 Message-ID: <86io94a3mf.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438085224 18209 80.91.229.3 (28 Jul 2015 12:07:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jul 2015 12:07:04 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 28 14:06:49 2015 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 1ZK3ei-0002tP-Kb for ged-emacs-devel@m.gmane.org; Tue, 28 Jul 2015 14:06:48 +0200 Original-Received: from localhost ([::1]:58357 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK3eh-0004ez-UH for ged-emacs-devel@m.gmane.org; Tue, 28 Jul 2015 08:06:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK3eE-0004DC-Rc for emacs-devel@gnu.org; Tue, 28 Jul 2015 08:06:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZK3eA-0003PK-Bc for emacs-devel@gnu.org; Tue, 28 Jul 2015 08:06:18 -0400 Original-Received: from gproxy4-pub.mail.unifiedlayer.com ([69.89.23.142]:55980) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ZK3eA-0003Op-1H for emacs-devel@gnu.org; Tue, 28 Jul 2015 08:06:14 -0400 Original-Received: (qmail 10319 invoked by uid 0); 28 Jul 2015 12:06:10 -0000 Original-Received: from unknown (HELO cmgw2) (10.0.90.83) by gproxy4.mail.unifiedlayer.com with SMTP; 28 Jul 2015 12:06:10 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw2 with id xo631q00n2UdiVW01o66E4; Tue, 28 Jul 2015 06:06:08 -0600 X-Authority-Analysis: v=2.1 cv=O9qq4nNW 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=y7kgw_RnJtkA:10 a=hEr_IkYJT6EA:10 a=x_XPkuGwIRMA:10 a=zOBTXjUuO1YA:10 a=fRDTIrgsO-Kb9oOWrDAA:9 Original-Received: from [76.218.37.33] (port=57310 helo=TAKVER2) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1ZK3e0-000392-Su for emacs-devel@gnu.org; Tue, 28 Jul 2015 06:06:05 -0600 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.23.142 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:188121 Archived-At: project.el uses a 'head' specializer in the dispatching argument of cl-defmethod. This use of 'head' is not documented other than in the 'Added elements' section of the cl-generic.el header comment. I'd like to change the cl-defmethod doc string to say: Other than a type, TYPE can also be one of the following: - `(eql VAL)' - this method will be invoked when the argument is `eql' to VAL. - `(head VAL)' - this method will be invoked when the `car' of the argument is `eql' to VAL However, that still leaves out the eieio-core specializer `subclass'; I'm not clear how to handle that in the doc string. I'm guessing the rationale for supporting the 'head' specializer is to allow using cl-defmethod with objects that are constructed by `cons', without any cl-defstruct or eieio defclass. That's how it is used in project.el. Is there a manual section for cl-defmethod? I don't see one in doc/misc/cl.texi; perhaps we should add one? -- -- Stephe