From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#25461: [Patch]: Missing doc strings for "," and ",@". Date: Thu, 19 Jan 2017 18:36:39 +0000 Message-ID: <20170119183639.GC3397@acm.fritz.box> References: <20170116212257.GA4747@acm.fritz.box> <20170118194320.GB4108@acm.fritz.box> <87r33zx5st.fsf@users.sourceforge.net> <20170119173728.GA3397@acm.fritz.box> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1484851050 28709 195.159.176.226 (19 Jan 2017 18:37:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 19 Jan 2017 18:37:30 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: 25461@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 19 19:37:25 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUHaD-0005xb-7r for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Jan 2017 19:37:13 +0100 Original-Received: from localhost ([::1]:50359 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUHaG-0000IG-CH for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Jan 2017 13:37:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUHa7-0000GH-7f for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2017 13:37:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUHa2-0004KV-CY for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2017 13:37:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37549) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cUHa2-0004KC-9G for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2017 13:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cUHa1-0001jl-UT for bug-gnu-emacs@gnu.org; Thu, 19 Jan 2017 13:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Jan 2017 18:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25461 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25461-submit@debbugs.gnu.org id=B25461.14848510186667 (code B ref 25461); Thu, 19 Jan 2017 18:37:01 +0000 Original-Received: (at 25461) by debbugs.gnu.org; 19 Jan 2017 18:36:58 +0000 Original-Received: from localhost ([127.0.0.1]:35748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUHZy-0001jT-2J for submit@debbugs.gnu.org; Thu, 19 Jan 2017 13:36:58 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:20204 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cUHZv-0001jK-QX for 25461@debbugs.gnu.org; Thu, 19 Jan 2017 13:36:56 -0500 Original-Received: (qmail 33273 invoked by uid 3782); 19 Jan 2017 18:36:54 -0000 Original-Received: from acm.muc.de (p548C6E05.dip0.t-ipconnect.de [84.140.110.5]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 19 Jan 2017 19:36:54 +0100 Original-Received: (qmail 3619 invoked by uid 1000); 19 Jan 2017 18:36:39 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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" Xref: news.gmane.org gmane.emacs.bugs:128248 Archived-At: Hello, Noam. On Thu, Jan 19, 2017 at 01:10:24PM -0500, Noam Postavsky wrote: > On Thu, Jan 19, 2017 at 12:37 PM, Alan Mackenzie wrote: > >> > +;; Give `,' and `,@' documentation strings which can be examined by C-h f. > >> > +(put '\, 'function-documentation > >> > + "`,' signals that the next form should be evaluated and inserted. [ .... ] > I agree backquote is the primary use, it's reasonable to emphasize that. > Because "," isn't a macro, it doesn't have any semantics. It's ^^^^ > misleading to suggest that it does. We could degenerate into a long silly discussion about what "have" means. , evaluates the form it precedes, and inserts it into the containing list. That's semantics enough for me. > >> > +It can occur only in `\\=`' constructs. > >> This isn't true. > > In what sense is it not true? I've never seen a comma used otherwise in > > a lisp program. What misunderstanding could it cause in a (relatively > > new) Lisp hacker reading it? > In the sense that it's possible to write a macro that could treat the > "," differently. I don't know of any that currently do*, but that's > just convention and should be documented as such. OK, I've toned down that part of the doc string. (See below.) > * `use-package' once handled unmatched "," as signifying eager > evaluation, but it no longer does that. How about this, then: "`,' signals that the next form should be evaluated and inserted. It occurs in `\\=`' constructs. For example: b => (ba bb bc) ; assume b has this value \\=`(a ,b c) => (a (ba bb bc) c) ; insert the value of b See also `\\=`' and `,@'. (Note that ``' constructs (including `,'s) sometimes have different semantics. This occurs, for example, with the macro `pcase' and other macros with similar names.) ? -- Alan Mackenzie (Nuremberg, Germany).