emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 f309651b67: ; Fix handling of 'not' by 'buffer-match-p'


From: Philip Kaludercic
Subject: emacs-29 f309651b67: ; Fix handling of 'not' by 'buffer-match-p'
Date: Sat, 31 Dec 2022 09:06:06 -0500 (EST)

branch: emacs-29
commit f309651b677e3be39a246c02973fd31fc74434d3
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    ; Fix handling of 'not' by 'buffer-match-p'
    
    * lisp/subr.el (buffer-match-p): Look up the cadr instead of the cdr
    for the negation in 'not'.
    * doc/lispref/buffers.texi (Buffer List): Update documentation.
    (Bug#58951)
---
 doc/lispref/buffers.texi | 18 ++++++++----------
 lisp/subr.el             |  4 ++--
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index c40e088293..57d627a420 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -977,17 +977,15 @@ first argument is @var{buffer-or-name} and the second is 
@var{arg}
 A cons-cell @code{(@var{oper} . @var{expr})} where @var{oper} is one
 of
 @table @code
-@item not
-Satisfied if @var{expr} doesn't satisfy @code{buffer-match-p} with
+@item (not @var{cond})
+Satisfied if @var{cond} doesn't satisfy @code{buffer-match-p} with
 the same buffer and @code{arg}.
-@item or
-Satisfied if @var{expr} is a list and @emph{any} condition in
-@var{expr} satisfies @code{buffer-match-p}, with the same buffer and
-@code{arg}.
-@item and
-Satisfied if @var{expr} is a list and @emph{all} conditions in
-@var{expr} satisfy @code{buffer-match-p}, with the same buffer and
-@code{arg}.
+@item (or @var{conds}@dots{})
+Satisfied if @emph{any} condition in @var{conds} satisfies
+@code{buffer-match-p}, with the same buffer and @code{arg}.
+@item (and @var{conds}@dots{})
+Satisfied if @emph{all} the conditions in @var{conds} satisfy
+@code{buffer-match-p}, with the same buffer and @code{arg}.
 @item derived-mode
 Satisfied if the buffer's major mode derives from @var{expr}.
 @item major-mode
diff --git a/lisp/subr.el b/lisp/subr.el
index 2fcdc7addf..af0a208f7b 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -7046,7 +7046,7 @@ CONDITION is either:
   * `major-mode': the buffer matches if the buffer's major mode
     is eq to the cons-cell's cdr.  Prefer using `derived-mode'
     instead when both can work.
-  * `not': the cdr is interpreted as a negation of a condition.
+  * `not': the cadr is interpreted as a negation of a condition.
   * `and': the cdr is a list of recursive conditions, that all have
     to be met.
   * `or': the cdr is a list of recursive condition, of which at
@@ -7073,7 +7073,7 @@ CONDITION is either:
                        (provided-mode-derived-p
                         (buffer-local-value 'major-mode buffer)
                         mode))
-                      (`(not . ,cond)
+                      (`(not ,cond)
                        (not (funcall match cond)))
                       (`(or . ,args)
                        (funcall match args))



reply via email to

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