From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: Lispref add-to-list - doc is unnecessary convoluted Date: Fri, 04 Dec 2020 16:28:29 +0100 Message-ID: References: <83zh2udle7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10645"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 04 16:29:26 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1klD1R-0002eN-N2 for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Dec 2020 16:29:25 +0100 Original-Received: from localhost ([::1]:54648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klD1Q-00067p-Ov for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Dec 2020 10:29:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klD0e-00052x-OK for emacs-devel@gnu.org; Fri, 04 Dec 2020 10:28:37 -0500 Original-Received: from mail-db8eur06olkn2016.outbound.protection.outlook.com ([40.92.51.16]:39905 helo=EUR06-DB8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klD0b-0000wB-Cp; Fri, 04 Dec 2020 10:28:36 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NqyDPeJUOCCeRFQK633cxUYoLue84O5KkR38/coMwbtdXwST4HlodF7SDdvl7/nT/+9340UzW+jVLjM/EAldr7EUkvAVxxizWUiQe1ld0+mA2znGFkPofBnVFdoAgMWCzbjAty2s46zUJkbqloLEHR62vSWVrihjnj2663SpVv34/rRHCJrOAWtxPF5AQuqPuIFuLOMpg5q6NKCIVyZxsad57OmRN8YPACPka9EhbEHCjMZQzLE6tT5+pw0+vfeflKrAn0oBjZddK1l1cpd9D09mer427Ld6BFx0y8zrMjt93L24+9VxRXvDTT8gBG7J1jPIus6W8csbb3mmggsmww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b5SmvZ39DqT6E5F+rgVPoxmrbT0K2CNsMAmbgRd9wN8=; b=nX0ORCEz8wMwAqTf893fLTT3v+O//QXFKZtSmxvSVr44Mk6lSI7hcItFGbYJaMKrDlxyCKnsrW2U0KHzQKw1TpyllAUM6+WvBQkXxwWa5ydsF6Tpky9Zsz4KY+Ld/+hZxu4dETDhb0DCarBSbSDqtXWDJzi2sBssMDsvHAx5IroO4sXPP8Dg7QxrD/KAY1jooEgAiWoNg7MpNfOj1VHa9F/+3ecb4EoX1iVCyDPN0Ewfja6jEiNFUrfvL77Cte8Qt0Ad5RdqeZYjj3yd1WkSSjRym73kuTF/w9ZVqbWGHehSiLpcfhKd1pA4F7WrnOIefWzU+lH9D93ltKNWdK9S6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b5SmvZ39DqT6E5F+rgVPoxmrbT0K2CNsMAmbgRd9wN8=; b=N6Iw5a1P5vQoTlWoB7KvF7jkfYf1hcO0yM+NGMEY+8c17CAQZz7FsX2RRQh/I4SY9IRKWKGaMqyhyhjAFlRUG7sKmwwMZdTAvOht0/NK3AXW0OUL6YqdeIaJtxoiKEplRxV76PjvIIRQ7vOVSum1UFuysmBmiF44mdhLIwfYDW10oemEynTW9s0okhfrfVLK/WNjjeZqh6toLE3tvacwRsqxpmlT4wBxA8aNwNNubIjAqQRTprd6NFPawUX15xin//Wv40ztTLOkwb6VfQnhkTuTDVtInTDUfHcuqXXwIvLgkDDBPhOirlpEPCC2fn0Mke9hhrgN39XvXWjxhUN5gw== Original-Received: from AM7EUR06FT043.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::48) by AM7EUR06HT130.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17; Fri, 4 Dec 2020 15:28:30 +0000 Original-Received: from AM0PR06MB6577.eurprd06.prod.outlook.com (2a01:111:e400:fc36::52) by AM7EUR06FT043.mail.protection.outlook.com (2a01:111:e400:fc36::89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17 via Frontend Transport; Fri, 4 Dec 2020 15:28:30 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:766F3C46CC55B4A1C1ECEF4A54FEE4421E2C10723E8B0F85E92D781D2F7CFA44; UpperCasedChecksum:B9B954AAC2ED37F19A58267A38087FDEC3EA9A2A5AFA3CD498FEFF9E5C2C4652; SizeAsReceived:7460; Count:46 Original-Received: from AM0PR06MB6577.eurprd06.prod.outlook.com ([fe80::9487:8c7d:da00:4993]) by AM0PR06MB6577.eurprd06.prod.outlook.com ([fe80::9487:8c7d:da00:4993%7]) with mapi id 15.20.3632.018; Fri, 4 Dec 2020 15:28:30 +0000 In-Reply-To: <83zh2udle7.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Dec 2020 10:29:36 +0200") X-TMN: [mCs4HpRuUEnBdGLbcVyMI/MgCCPLUuQ3] X-ClientProxiedBy: AM6PR10CA0024.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:89::37) To AM0PR06MB6577.eurprd06.prod.outlook.com (2603:10a6:208:19a::23) X-Microsoft-Original-Message-ID: <87a6ut615u.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM6PR10CA0024.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:89::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17 via Frontend Transport; Fri, 4 Dec 2020 15:28:29 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 3ac45eca-f026-4f2c-555a-08d8986940a5 X-MS-TrafficTypeDiagnostic: AM7EUR06HT130: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0ceQXchQQtXzt3YAm/TzuTkRpiS3tIBfdT9zUwiQu773Qw7TiMY3FqLPfWrixJi9YHBmxF34xcGRMuVKmkvWHYmUnMqZyhMleXKlaYrOzU05xZwGhhpUaG4gKMRAKoEkdYilH2Z86c2uujj+pUfRCQU4pWDOPZqTFqgZfKO10WxEkpeqbpKCZpCa+qniVpmkQv0bJLanHRDFbn1J+oyJ8g== X-MS-Exchange-AntiSpam-MessageData: jaYVmfYLe0BIw6rHxCRbASp8fkbk5pDR6XJLWV3sD3+Z/CZuUg9IUQLyi4+3ilMIl/c1kHa6Gf3vYnN0FSsRAkNgrHrky5G/ZvZNYu48dc4tS689wBAAGMxXjf/V+TZ799VoiowuBJUsk8azGu7OMg== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ac45eca-f026-4f2c-555a-08d8986940a5 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2020 15:28:30.2832 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT043.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT130 Received-SPF: pass client-ip=40.92.51.16; envelope-from=arthur.miller@live.com; helo=EUR06-DB8-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:260300 Archived-At: Eli Zaretskii writes: >> From: Arthur Miller >> Date: Fri, 04 Dec 2020 03:17:19 +0100 >> >> +This function adds the @var{element} to a list @var{list} if > > This will produce "... to a list LIST if ...", which is sub-optimal. > > You omitted the part where the current doc string warns against an > argument that is not a list, and that's losing information. Yes, it was on purpose, partly because hopefully the argument name LIST is self-documenting and partly because name of the function says add-to-list which is self-documenting too. Partly because I also dislike the wording: "better be a list". Does not sound so proffsy to me; but we can add description for the argument, and change name to LIST-VAR as suggested. Maybe the argument should be called LIST-NAME Another question, why doesn't add-to-list take a list value, why symbol? Maybe I don't understand lisp enough, but why is this not desirable: (add-to-list '(1 2 3) '4) or (add-to-list (list 1 2 3) 4) >> -The argument @var{symbol} is not implicitly quoted; @code{add-to-list} >> -is an ordinary function, like @code{set} and unlike @code{setq}. Quote >> -the argument yourself if that is what you want. >> +The argument @var{list} is not implicitly quoted; @code{add-to-list} >> +is an ordinary function, like @code{set} and unlike @code{setq}. > > Not sure why you want to drop the explicit suggestion to quote the > list symbol here: it's also losing information. Mostly because I think it is rather description of implementation and also because I dislike the wording: "Quote the argument yourself if that is what you want." "If that is I want"? :-) If I don't want - is it not needed then? :-) Is LIST-NAME ok suggestion? And I can put back info about it's value and quote. Will have to do it tomorrow though.