From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#22336: 25.0.50; cl-generic.el features are not documented in ELisp manual Date: Sun, 24 Jan 2016 03:45:21 +0300 Message-ID: <56A41EA1.3010406@yandex.ru> References: <83h9innmtv.fsf@gnu.org> <831t9iexrw.fsf@gnu.org> <8337tp71q5.fsf@gnu.org> <56A30FCE.4030009@yandex.ru> <83twm46d8y.fsf@gnu.org> <56A337B3.9050802@yandex.ru> <83d1ss5uhz.fsf@gnu.org> <56A3B22C.80902@yandex.ru> <83pows43ft.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1453596386 17742 80.91.229.3 (24 Jan 2016 00:46:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Jan 2016 00:46:26 +0000 (UTC) Cc: 22336@debbugs.gnu.org, monnier@IRO.UMontreal.CA To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 24 01:46:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1aN8oo-0006Ak-Ae for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 Jan 2016 01:46:14 +0100 Original-Received: from localhost ([::1]:58898 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aN8ok-0004CW-BS for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Jan 2016 19:46:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aN8og-0004CQ-P9 for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 19:46:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aN8oc-0007nh-NC for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 19:46:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44434) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aN8oc-0007nd-JW for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 19:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aN8oc-0005is-Ee for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 19:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Jan 2016 00:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22336 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22336-submit@debbugs.gnu.org id=B22336.145359633021954 (code B ref 22336); Sun, 24 Jan 2016 00:46:02 +0000 Original-Received: (at 22336) by debbugs.gnu.org; 24 Jan 2016 00:45:30 +0000 Original-Received: from localhost ([127.0.0.1]:60887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN8o6-0005i2-0H for submit@debbugs.gnu.org; Sat, 23 Jan 2016 19:45:30 -0500 Original-Received: from mail-lf0-f42.google.com ([209.85.215.42]:36411) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN8o4-0005hn-VA for 22336@debbugs.gnu.org; Sat, 23 Jan 2016 19:45:29 -0500 Original-Received: by mail-lf0-f42.google.com with SMTP id h129so67138441lfh.3 for <22336@debbugs.gnu.org>; Sat, 23 Jan 2016 16:45:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=EI4tqd00iNKUk0V48TPpW+F6k8oclBXzm1S4F8dsvY4=; b=z9WhzrKaS694i9fBJ0waRQCIr+ekqaDVTZQXFqxazqOtCmayl0QFcEzvM43mLBMTUV Wo+LbtnOEzV4sg+TaiZ58UGOtmQ9KrBWXgRn4iyVJ9soRW1YwSY7JW7wCtnX5qLND4uE EMjdDpyxN0alssy/eDw2Jj1JhJGFKRX1Kjk4mnZEBRs1eJY1MYKpNsfIDdpXVpe5s0qM 6kjLSHmsretQ1vZUOVUK0u0YY76HkPecaysyou3Q4fyoa9GBfiqzuuecRZdA2u0/ZaGJ UdOH5eju1xKGIqG0Qvgqhx1BMtH8e2y9VN7ezKUOHpAOtujGuZ1VGxwd0ce2E8WIShaD 3ilw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=EI4tqd00iNKUk0V48TPpW+F6k8oclBXzm1S4F8dsvY4=; b=T+JsQFwhymukY9/mF7xOQJpBHsm0Tl2F97Y/pMdkGlaRQ+91CCGZ7VVSvlDpL+VnEc dTD6kRl/vUICWPeZt56qtTUMmPEu8RRlnx6NYOaCcnWyi87IuVxGspYs98SIrBzSUwdg SxCaxe8VBml47opqpe6xO7yz5DvK7xOXpHt9ATOWr8NiFMrGYW8GfM7Bw5wu8poOAjs0 xAkMY8mxjvyMJU2i0/WCrOS+Yp2VftHOaLIVf7djHGxPWdyJWQujoF69VFjUhEgoPItY +behEy65iTQKCc5NMgMhy0HTBbuy3aMaNxa8ulC2DkgFaIg94MXzXQI9oTH8ySfKX07O J/Gg== X-Gm-Message-State: AG10YOQYY119pipl70wrJc5A2LsBv1YyuLKWYnldZeb8sRYpmRXs8BNKZ8euedfI2O1EYQ== X-Received: by 10.25.20.221 with SMTP id 90mr3821646lfu.98.1453596322727; Sat, 23 Jan 2016 16:45:22 -0800 (PST) Original-Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id a124sm1759840lfa.40.2016.01.23.16.45.21 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 23 Jan 2016 16:45:21 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 In-Reply-To: <83pows43ft.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:111903 Archived-At: On 01/23/2016 08:21 PM, Eli Zaretskii wrote: > I know. The point is the stuff contradicts itself, and when I was > reading this, I needed to decide which part to believe and which to > discard. I think I mostly succeeded, albeit at a significant cost; > I've mentioned these only because you asked about them. It doesn't exactly contradict itself, though it almost looks that way. I've renamed the argument to hopefully make it make more sense. >>> Anyway, specific methods can evidently be defined by cl-defgeneric as >>> well, whereas the doc string says they should be defined by >>> cl-defmethod. The semantics of :method is never described at all (and >>> I saw no examples of its usage to inspire me, AFAIR). >> >> Is the can/should distinction a problem? > > Of course it is. "Should" is sometimes a synonym of "must". Actually, the docstring says "methods are defined", not that they should be defined. And that's true either way: the :method definitions, and the default-body, are still passed to cl-defmethod. I don't how to improve this part, so I didn't touch it. >> I think the semantics are easy to guess, but I probably glanced at CL's >> documentation as well at some point: > > I did guess, see what I wrote in the manual. But I shouldn't have > needed to guess, I think. I didn't touch this one either. The current description in the docstring might be enough, since I wrong the examples in the previous message just by looking at the docstring. >>> "_The_ dispatch argument", in singular means only one such argument is >>> possible, which is of course false. >> >> Indeed. There's a case to be made for discouraging multiple-argument >> dispatch ("implemented rather naively"), but the docstring should be >> corrected anyway. > > I thought this was one of the strong points of Lisp-style OOP. Docstring corrected. >> cl-defmethod docstring should probably enumerate the possible types >> (aside from the mentioned ones, TYPE can be (head ...) or a name of >> cl-struct, like the commentary says). > > I think so, yes. Also, it should at least hint on the hierarchy of > types. Types are now mentioned, as well as the word "hierarchy". I've referenced a private variable to do that, but I think that's okay in a docstring (docstrings are allowed to change between releases).