From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65797: `buffer-match-p` should not use `func-arity` Date: Sun, 08 Oct 2023 02:10:33 -0700 Message-ID: <87v8bhtr3k.fsf@breatheoutbreathe.in> References: <87v8cmct9b.fsf@breatheoutbreathe.in> <87sf7o38g1.fsf_-_@posteo.net> <871qf1rbdo.fsf@posteo.net> <87o7hz4zg2.fsf@posteo.net> <87sf7b8ker.fsf@posteo.net> <87y1h2blxq.fsf@posteo.net> <874jjqb715.fsf@posteo.net> <0371b6ff-58e4-961e-29c9-4efb65b82185@gutov.dev> Reply-To: Joseph Turner Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5732"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65797@debbugs.gnu.org, Philip Kaludercic , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Stefan Monnier , Eli Zaretskii To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 08 11:14:23 2023 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 1qpPrf-0001D4-IU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Oct 2023 11:14:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpPr8-0002Aa-D4; Sun, 08 Oct 2023 05:13:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpPr5-000224-2z for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 05:13:43 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpPr4-0002OT-ME for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 05:13:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpPrO-0006Cm-6g for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 05:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joseph Turner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Oct 2023 09:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65797 X-GNU-PR-Package: emacs Original-Received: via spool by 65797-submit@debbugs.gnu.org id=B65797.169675640123783 (code B ref 65797); Sun, 08 Oct 2023 09:14:02 +0000 Original-Received: (at 65797) by debbugs.gnu.org; 8 Oct 2023 09:13:21 +0000 Original-Received: from localhost ([127.0.0.1]:56256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpPqj-0006BX-3l for submit@debbugs.gnu.org; Sun, 08 Oct 2023 05:13:21 -0400 Original-Received: from out-191.mta0.migadu.com ([91.218.175.191]:32904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpPqe-0006BJ-KV for 65797@debbugs.gnu.org; Sun, 08 Oct 2023 05:13:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1696756375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ALSmH/VREyJnFKueNZyNBOOTsZ/a0br6cXkn6APCc0c=; b=ZwjDakdBqb2pPSfxBC/ugKUPFJdIXz1wuyihcyIfHKXApbQklYRG5jP7PEKev3EGgOK/qd zQiKFvsG/PVghqEh2P7NBsWyyC+0co1EwKS0zm3bDIcuEgbEiUuv3XDe44jG+5GsP/tU5h HPJg9/IWxxmWrBNPG8EVbckQHNxpzTE= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <0371b6ff-58e4-961e-29c9-4efb65b82185@gutov.dev> X-Migadu-Flow: FLOW_OUT 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272066 Archived-At: Dmitry Gutov writes: > On 19/09/2023 16:56, Philip Kaludercic wrote: >> Dmitry Gutov writes: >> >>> On 19/09/2023 11:34, Philip Kaludercic wrote: >>>>> [ BTW, changing the code to use `&rest args` instead of `&optional arg` >>>>> would help for this, right? ] >>>> How come? >>> In project.el buffer-match-p would be called without an extra >>> argument, so the predicates would be called without an extra argument >>> as well. >>> >>> That should take care of that compatibility, I think. >> But what does that have to do with &rest vs &optional? > > Stringly speaking, nothing, because you can manage the same scheme > with &optional - just dispatching to pred with different number of > arguments depending on whether the &optional arg is nil. Though that > breaks a little when nil is a meaningful value (probably a rare case). > > Rewriting the function in terms of &rest just makes this solution the > most natural one, I suppose. I am in favor of this solution as well. > Though we'll still have to document the distinction in the docstrings > of project-kill-buffer-conditions and etc (the number of the arguments > called with). How do the project.el docstrings need to be updated? Thank you! Joseph