From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#57502: 29.0.50; Issue with `or' clause of buffer-match-p Date: Wed, 31 Aug 2022 16:30:23 +0000 Message-ID: <87czcg5qao.fsf@posteo.net> References: <87o7w0fwnt.fsf@gmail.com> <87ilm87f78.fsf@posteo.net> <878rn47f21.fsf@posteo.net> <87k06o4c3s.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19705"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57502@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 31 18:32:05 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 1oTQdJ-000508-7b for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Aug 2022 18:32:05 +0200 Original-Received: from localhost ([::1]:53924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTQdH-0004VF-2i for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Aug 2022 12:32:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTQcI-0004Sc-KV for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2022 12:31:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50579) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTQcI-0002am-Bv for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2022 12:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oTQcH-0001T0-Ru for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2022 12:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Aug 2022 16:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57502 X-GNU-PR-Package: emacs Original-Received: via spool by 57502-submit@debbugs.gnu.org id=B57502.16619634385602 (code B ref 57502); Wed, 31 Aug 2022 16:31:01 +0000 Original-Received: (at 57502) by debbugs.gnu.org; 31 Aug 2022 16:30:38 +0000 Original-Received: from localhost ([127.0.0.1]:40328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTQbu-0001SI-Ih for submit@debbugs.gnu.org; Wed, 31 Aug 2022 12:30:38 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:49981) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTQbr-0001S2-Kd for 57502@debbugs.gnu.org; Wed, 31 Aug 2022 12:30:38 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B946124010A for <57502@debbugs.gnu.org>; Wed, 31 Aug 2022 18:30:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1661963429; bh=QETNOl7fXoUefcQ9DvHPFrtykFI0nuqxZi9StxufhJI=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=mNSUWMH7iIqfJViwOJ2m69pf75Cilv9cvyAo2E6dHKetcXE7IQHZIUQ7IIpZhmTcL Gq82SWdryAmyraBZc7ER5worRwarvNmP06BXUaZv6DE/ByuYU1BrjWl9IOLKqf1VwV TF/lJ0d1g2cMP4uvw35roZDHwntS1dJ6dCgMlwvK3BEnxAkTd3fkrUAj1QlxPscP7P bcng0I3qdQox69SsZxU/3cWFHBK/z1QWhV8zUInMDn0rkhnjA1SIsbwCvAnPF3hSiD xpAIoNZBEBa074wgk0Xrz8LKPG9AnLAAyJ1fer2GLQbWHoElJZca41iLO77WwvtbMd VqhK9jaPRvVMA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MHqR914sxz6tpV; Wed, 31 Aug 2022 18:30:28 +0200 (CEST) In-Reply-To: <87k06o4c3s.fsf@gmail.com> (Augusto Stoffel's message of "Wed, 31 Aug 2022 18:22:15 +0200") Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB 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:241210 Archived-At: Augusto Stoffel writes: > On Wed, 31 Aug 2022 at 12:50, Philip Kaludercic wrote: > >> That might look something like this: >> > [...] >> + (`(derived-mode . ,mode) >> + (provided-mode-derived-p >> + (buffer-local-value 'major-mode buffer) >> + mode)) > > On a tangent, wouldn't it be nice to allow a list of modes? That is, > >> + (`(derived-mode . ,modes) >> + (apply #'provided-mode-derived-p >> + (buffer-local-value 'major-mode buffer) >> + modes)) > > (with some extra care to keep backwards compatibility). Intuitively I feel as though this could be more problematic/confusing than convenient. If this is done, then it should be supported in every case, so that (and (derived-mode foo-mode) (major-mode . bar-mode)) (I know this is a stupid example) doesn't make someone want to try (and (derived-mode foo-mode) (major-mode bar-mode)) and be confused why it fails.