From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#45333: complex command history should not save optional nil parameters Date: Tue, 05 Jul 2022 22:49:57 +0200 Message-ID: <87o7y3l1xm.fsf@gnus.org> References: <0DJzRuBn1S9jW_MoJt5HXcLQWrzb7Vjkfmlwa9zPvgLIFeEfdPLoiguSztbL4TnuHyxd59Z7BpS9qJo5BinMO3n1mDlWjcytLjq9HmoGIl0=@protonmail.com> <8735ggk7nz.fsf@gnus.org> <83ee007gxo.fsf@gnu.org> <87o7z3bcsp.fsf@gnus.org> <875ykbabl1.fsf@web.de> <87o7y31pho.fsf@gnus.org> <87wncrs8js.fsf@web.de> <87sfnfmm41.fsf@gnus.org> <87k08rs7jg.fsf@web.de> <87bku3ml4x.fsf@gnus.org> <87fsjfs5v2.fsf@web.de> <871quzmj9a.fsf@gnus.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="37721"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: laszlomail@protonmail.com, Eli Zaretskii , 45333@debbugs.gnu.org, Stefan Monnier To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 05 22:51:09 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1o8pVk-0009Ze-Ud for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Jul 2022 22:51:08 +0200 Original-Received: from localhost ([::1]:34874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8pVj-0002aX-GP for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Jul 2022 16:51:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8pVd-0002aP-SN for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 16:51:01 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57936) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8pVd-0006sk-Jv for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 16:51:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o8pVd-0002Ov-Je for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 16:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Jul 2022 20:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45333 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 45333-submit@debbugs.gnu.org id=B45333.16570542119149 (code B ref 45333); Tue, 05 Jul 2022 20:51:01 +0000 Original-Received: (at 45333) by debbugs.gnu.org; 5 Jul 2022 20:50:11 +0000 Original-Received: from localhost ([127.0.0.1]:51833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8pUp-0002NV-Ce for submit@debbugs.gnu.org; Tue, 05 Jul 2022 16:50:11 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:48130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8pUn-0002NG-Fx for 45333@debbugs.gnu.org; Tue, 05 Jul 2022 16:50:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=NDkeSQxTjpM9E7Ef5mu2+usz2kS5UvV89l9GIeMoQPk=; b=WWihowIrs7yr4EeuzqdFlrDCYS EnSpt7D/qbVaHiPAs9OQINhmKLphOYE7I7GFV2YPbP02at9pmk2ZA5FEtO0PDHc2y6W+6nQvNWd4s jfd23G/hM6nnf6Z2u/fOF6arE++mlUqsOoB/RESLwLQ302zFPMWOMRLVon2LYtdP/2Hg=; Original-Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8pUc-0005it-QZ; Tue, 05 Jul 2022 22:50:01 +0200 In-Reply-To: <871quzmj9a.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 05 Jul 2022 21:50:25 +0200") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJFBMVEX3vR78xBz8xiPw vCPOoybDojcoU6F+g3CckVpWa4RjcXr///9rP2zAAAAAAWJLR0QLH9fEwAAAAAd0SU1FB+YHBRQb FCH0alYAAAGKSURBVDjLbZM9TgNBDIVnkgtgL0ghnU2TNlmgD1oOgOAKEVyDgoiUKZBouSn2en48 A5Miib/187PHGyLMh+wLUH8iMwcLYwYaJi5A/gjUEPAcFoCYckRFgiksIDLa8yxPuxM0XaUEENcE Dgt5Um2glGVAdFJMxLfTNO0nPY+7AkDAMC7H3RjHm3GZMyQBiFUhlamAwcL6wQaQZc1p4FyJGwVI qoPerojLqGpWBVZB+nHNJwAwPMus+KWCOFcHuHyV4awOTec29eMTwf17nyFjWb3x3Rc2QO9SbG0+ PomclIxK7wjp9LCpSuIKrAe+OiB+O6mt+kdpY3VmOv2pIbbWAo7MvV2C6zPAcedqaHe6KTPY+gyw BerBAtMKGsA83xChAWXAFawNIHlAFZTdpRbU3Q1F6sdcgQeagSI6aKs8L5HUkG3nnGYr1rrKINkS KX1hCkh76WvkDF+c3Fub9zeEiE0NMgPcxYsz72pr1YurmIpf7Ns+QqfDabX6BuuLk5Wayq6Pf0A/ rHQjv8c1hIV9NDCUAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTA3LTA1VDIwOjI3OjIwKzAwOjAw C1CYRwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wNy0wNVQyMDoyNzoyMCswMDowMHoNIPsAAAAA SUVORK5CYII= X-Now-Playing: King Crimson's _Three of a Perfect Pair_: "No Warning" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:236185 Archived-At: Lars Ingebrigtsen writes: > (Which reminds me -- I've always found it odd that that function lives > in help.el, and is in Emacs Lisp instead of C. It is, after all, used > by eldoc etc, and it'd probably be nice if it were more efficient.) So I started taking a stab at this to see whether there's any gains to be had, and I've now basically rewritten it in C. And, yes, I think it makes sense, because we can avoid at least some garbage generating functions without contorting ourselves too much. One thing, though -- I'm not sure how to do the oclosure stuff from C, so I've added Stefan to the CCs. It's this bit: ;; Advice wrappers have "catch all" args, so fetch the actual underlying ;; function to find the real arguments. (setq def (advice--cd*r def)) This is an oclosure these days. (While poking at this, if we want to do the proposed history shortening, we don't need to look at the arglist at all -- we can just call Ffunc_arity, which will return Qmany for &rest, so this help-function-arglist rewrite is totally irrelevant for this bug report.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no