From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master ff09851: * lisp/emacs-lisp/macroexp.el: Rewrite the code warning about '(lambda ...) Date: Sun, 28 Feb 2021 10:29:33 -0500 Message-ID: References: <20210228012322.8694.47149@vcs0.savannah.gnu.org> <20210228012323.D4EF020E1B@vcs0.savannah.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="23489"; 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: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 28 18:57:50 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 1lGQKD-00061S-PP for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Feb 2021 18:57:49 +0100 Original-Received: from localhost ([::1]:49954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGQKC-00089W-Px for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Feb 2021 12:57:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGQIt-0007as-MH for emacs-devel@gnu.org; Sun, 28 Feb 2021 12:56:27 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:2990) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGQIn-0005hT-Bc for emacs-devel@gnu.org; Sun, 28 Feb 2021 12:56:26 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 153A180B91; Sun, 28 Feb 2021 10:29:36 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7F867805AC; Sun, 28 Feb 2021 10:29:34 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1614526174; bh=pfxoSmuQv2FMlGXUjfz3rUA0orco7MgyGf8tttC/6Mw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=fM4XxN9bN7r0F0SozjwgB+aAiLPs2NIld9Rt9SB4E+FOVwxv3e808/oJMjI9fsYOi J8RLt8LW33eTOChlXmXzSgLS0vd4l/OI27Mwd6x34l/XH21Dk7u2CdgpIi+WZtfdiM wtrazyOAwna+l4IRBwv1j7/m/ryPK8/uEwuk5QAjUYE+VrAkc8Fa4dSoxgp8rqp28z MTnr+GxonnI3qpmWv3U8w8xAu6hFqV6F1bde9INdt2FIlo/PxBgJfbd2n9SGJync3D xIXCMGuR09ldp8z1hBZtz3d9VuEgXEqRtIzaGnfaO2PrMItm2joQuqw1s9jQnM9lvq yT8j3VkM48F0A== Original-Received: from alfajor (unknown [216.154.41.47]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1F45712026C; Sun, 28 Feb 2021 10:29:34 -0500 (EST) In-Reply-To: (Pip Cet's message of "Sun, 28 Feb 2021 08:28:02 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:265754 Archived-At: >> +;; 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. Feel free to add. You could even go crazy and add a `declare` form for it ;-) >> + (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)). I don't care very much about the color of those bikesheds. >> +(dolist (f '( add-hook remove-hook advice-remove advice--remove-function > Just out of curiosity, is the space after '( intentional? >From etc/NEWS: *** A space between an open paren and a symbol changes the indentation rule. The presence of a space between an open paren and a symbol now is taken as a statement by the programmer that this should be indented as a data list rather than as a piece of code. -- Stefan