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

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

bug#58951: [PATCH] ; Fix handling of 'not' by 'buffer-match-p'


From: Philip Kaludercic
Subject: bug#58951: [PATCH] ; Fix handling of 'not' by 'buffer-match-p'
Date: Tue, 01 Nov 2022 19:36:12 +0000

Tags: patch


In preparing bug#58950 I noticed that the 'not' clause is confusing, and
is misused on the place I could find it being used in the core
(show-paren-predicate).  The current implementation would require a
negation to be written as

    (not . CONDITION)

while it is more natural to write

    (not CONDITION)

which is more in line with (and ...) and (or ...).

The issue appears to go back to `project--buffer-check', that takes a
list of conditions instead of a single one.  This means that the above
are equivalent. since (not CONDITION) will check each element in the
unary list in (not . (CONDITION)).

I believe this is preferable to fixing `show-paren-predicate', as this
is the kind of issue a lot of people could trip over.

This patch is based on the patch from bug#58950, but can be back-ported
to the previous implementations if there are any issues with that report.

In GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version
 3.24.30, cairo version 1.16.0) of 2022-10-31 built on heron
Repository revision: 462a66e79edcc34ecbeef7cc1604765adfdc038e
Repository branch: feature/package+vc
System Description: Guix System

Configured using:
 'configure --with-pgtk --with-imagemagick
 
PKG_CONFIG_PATH=/gnu/store/ssg343s6ldqdwh30136pnawhbgd0cb6i-profile/lib/pkgconfig:/gnu/store/ssg343s6ldqdwh30136pnawhbgd0cb6i-profile/share/pkgconfig'

Attachment: 0001-Fix-handling-of-not-by-buffer-match-p.patch
Description: Text Data


reply via email to

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