bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57502: 29.0.50; Issue with `or' clause of buffer-match-p


From: Philip Kaludercic
Subject: bug#57502: 29.0.50; Issue with `or' clause of buffer-match-p
Date: Wed, 31 Aug 2022 16:30:23 +0000

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 via email to

[Prev in Thread] Current Thread [Next in Thread]