From cb88a512eacb3ad73c22682c9c794cdc80445f43 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Tue, 1 Nov 2022 20:27:17 +0100 Subject: [PATCH] ; 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'. --- lisp/subr.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index b667339db9..0252e66686 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -7023,7 +7023,7 @@ string-lines `(provided-mode-derived-p (buffer-local-value 'major-mode ,buffer-sym) ',mode)) - (`(not . ,cond) + (`(not ,cond) `(not ,(funcall translate cond))) (`(or . ,conds) `(or ,@(mapcar translate conds))) @@ -7045,7 +7045,7 @@ string-lines * `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 -- 2.38.0