From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: master ff09851: * lisp/emacs-lisp/macroexp.el: Rewrite the code warning about '(lambda ...) Date: Sun, 28 Feb 2021 08:28:02 +0000 Message-ID: References: <20210228012322.8694.47149@vcs0.savannah.gnu.org> <20210228012323.D4EF020E1B@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11453"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org, Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 28 09:29:13 2021 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 1lGHRx-0002sH-Ij for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Feb 2021 09:29:13 +0100 Original-Received: from localhost ([::1]:41166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGHRw-0005Gm-Ki for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Feb 2021 03:29:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41270) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGHRQ-0004qm-RI for emacs-devel@gnu.org; Sun, 28 Feb 2021 03:28:41 -0500 Original-Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]:46350) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGHRP-0008IP-GW for emacs-devel@gnu.org; Sun, 28 Feb 2021 03:28:40 -0500 Original-Received: by mail-oi1-x22f.google.com with SMTP id f3so14765646oiw.13 for ; Sun, 28 Feb 2021 00:28:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Sf+8EniauRzklTIw5dVgrvka2qFM8yI7x2kyHMg9f7I=; b=qVPSe+YwpLmrTY8oy6llUR/Hbj/qvM5L9zyE02dHbxh/fkTEMg6zazeIJhJQjXKhGO l24Et7GRuIxtQVXKbMPbx0q7pAn/m3U4ogBJ8O9o2tZx2uKELm4clIYNBCebOkXelAZt lzCOhF3XgR6rZwdUSpglM7pZIcs1Ue+T8r4YJF8hsA8XexDz8F60QT7H8Q1qvsRgqG/e ViC96uBOiC+c1G9LKJvh6hBZiUZ20sa2cf1mi9TQTI+eyRCF9oyWsD+yNbI5Z8ESkY+V ApLX8eCKYIRqlhB9eVVLVgWLIP8z6mlSShFq0EsCZ0TgayAgKLoeYrRsuco4PfkWjUpB RDMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Sf+8EniauRzklTIw5dVgrvka2qFM8yI7x2kyHMg9f7I=; b=lzJsRo/zQKpukghpsXxF9c71xV79B+uQ9fO5GjHzAku2s+SwB5dzRhBSnDyBc5AgIU 7O46kX9LOtXHZ3dGoyCroVf3q7mAvlbY8NqmLCFAQIjcXXHYW3QVDAl4K6rkZfxyL5am fmvLoZAvugasoz+pMPyMfj6ohFjaPfmM+il2u29Rc2MCH2LO0Ij4M+DMaKhm6fumi3A1 oj1OsMiKtqjt9dW0ML9pHddLFxoPsRDDAHNdrbb9391q2Q2wJMr3RVSFvK1Cyy5iyF9m nHS2kDXJhLuL9OFRBqPCngoqhoyl/X5fQCBoMCqtjx0B5wMKHgZsUK4EJ7gEbOJ7owOW 1SOw== X-Gm-Message-State: AOAM532vjQYmf8ObBmr3Ib5oT662Wwl7TFLCxRqO1vCYNcuY4FnLQ5DF 6ijZ8+DjVKc9YsP34mmvPj/82LfgvE0xSftWUxKwX9hbZ64= X-Google-Smtp-Source: ABdhPJykHl9Hs2ogLSpxem+JgvQaaJ95ZwdEJcHFNFCT5EQcMnq2BSJgybp7mqlo8XkQNYKZ6XB+bo/LTWCK53O+ezY= X-Received: by 2002:aca:4c5:: with SMTP id 188mr7770734oie.44.1614500918244; Sun, 28 Feb 2021 00:28:38 -0800 (PST) In-Reply-To: <20210228012323.D4EF020E1B@vcs0.savannah.gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::22f; envelope-from=pipcet@gmail.com; helo=mail-oi1-x22f.google.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:265746 Archived-At: I really like this change. Some nitpicks: > +;; Record which arguments expect functions, so we can warn when those > +;; are accidentally quoted with ' rather than with #' > +(dolist (f '(funcall apply mapcar mapatoms mapconcat mapc cl-mapcar maphash)) But not mapcan? There are a few other map* functions which might be eligible. > + (put f 'funarg-positions '(1))) I think that should be `function-put' (paired with `function-get' above), not `put'. I'm also in favor of zero-based indexing, so I'd prefer (function-put f 'funarg-positions '(0)). At some point when native-comp is merged (soon, I hope!) we should look at the function types it uses and how to expose those to macroexp. > +(dolist (f '( add-hook remove-hook advice-remove advice--remove-function Just out of curiosity, is the space after '( intentional? Pip