unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Augusto Stoffel <arstoffel@gmail.com>
Cc: 57502@debbugs.gnu.org
Subject: bug#57502: 29.0.50; Issue with `or' clause of buffer-match-p
Date: Wed, 31 Aug 2022 16:30:23 +0000	[thread overview]
Message-ID: <87czcg5qao.fsf@posteo.net> (raw)
In-Reply-To: <87k06o4c3s.fsf@gmail.com> (Augusto Stoffel's message of "Wed, 31 Aug 2022 18:22:15 +0200")

Augusto Stoffel <arstoffel@gmail.com> writes:

> On Wed, 31 Aug 2022 at 12:50, Philip Kaludercic <philipk@posteo.net> 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.





  reply	other threads:[~2022-08-31 16:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31 12:02 bug#57502: 29.0.50; Issue with `or' clause of buffer-match-p Augusto Stoffel
2022-08-31 12:47 ` Philip Kaludercic
2022-08-31 12:50   ` Philip Kaludercic
2022-08-31 16:22     ` Augusto Stoffel
2022-08-31 16:30       ` Philip Kaludercic [this message]
2022-09-03 11:04     ` Philip Kaludercic
2022-09-03 11:10       ` Eli Zaretskii
2022-09-03 11:19         ` Philip Kaludercic
2022-09-03 11:54           ` Lars Ingebrigtsen
2022-09-03 12:56             ` Philip Kaludercic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czcg5qao.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=57502@debbugs.gnu.org \
    --cc=arstoffel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).