; 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)
This commit is contained in:
parent
9292f595a7
commit
f309651b67
2 changed files with 10 additions and 12 deletions
|
@ -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
|
A cons-cell @code{(@var{oper} . @var{expr})} where @var{oper} is one
|
||||||
of
|
of
|
||||||
@table @code
|
@table @code
|
||||||
@item not
|
@item (not @var{cond})
|
||||||
Satisfied if @var{expr} doesn't satisfy @code{buffer-match-p} with
|
Satisfied if @var{cond} doesn't satisfy @code{buffer-match-p} with
|
||||||
the same buffer and @code{arg}.
|
the same buffer and @code{arg}.
|
||||||
@item or
|
@item (or @var{conds}@dots{})
|
||||||
Satisfied if @var{expr} is a list and @emph{any} condition in
|
Satisfied if @emph{any} condition in @var{conds} satisfies
|
||||||
@var{expr} satisfies @code{buffer-match-p}, with the same buffer and
|
@code{buffer-match-p}, with the same buffer and @code{arg}.
|
||||||
@code{arg}.
|
@item (and @var{conds}@dots{})
|
||||||
@item and
|
Satisfied if @emph{all} the conditions in @var{conds} satisfy
|
||||||
Satisfied if @var{expr} is a list and @emph{all} conditions in
|
@code{buffer-match-p}, with the same buffer and @code{arg}.
|
||||||
@var{expr} satisfy @code{buffer-match-p}, with the same buffer and
|
|
||||||
@code{arg}.
|
|
||||||
@item derived-mode
|
@item derived-mode
|
||||||
Satisfied if the buffer's major mode derives from @var{expr}.
|
Satisfied if the buffer's major mode derives from @var{expr}.
|
||||||
@item major-mode
|
@item major-mode
|
||||||
|
|
|
@ -7046,7 +7046,7 @@ CONDITION is either:
|
||||||
* `major-mode': the buffer matches if the buffer's major mode
|
* `major-mode': the buffer matches if the buffer's major mode
|
||||||
is eq to the cons-cell's cdr. Prefer using `derived-mode'
|
is eq to the cons-cell's cdr. Prefer using `derived-mode'
|
||||||
instead when both can work.
|
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
|
* `and': the cdr is a list of recursive conditions, that all have
|
||||||
to be met.
|
to be met.
|
||||||
* `or': the cdr is a list of recursive condition, of which at
|
* `or': the cdr is a list of recursive condition, of which at
|
||||||
|
@ -7073,7 +7073,7 @@ CONDITION is either:
|
||||||
(provided-mode-derived-p
|
(provided-mode-derived-p
|
||||||
(buffer-local-value 'major-mode buffer)
|
(buffer-local-value 'major-mode buffer)
|
||||||
mode))
|
mode))
|
||||||
(`(not . ,cond)
|
(`(not ,cond)
|
||||||
(not (funcall match cond)))
|
(not (funcall match cond)))
|
||||||
(`(or . ,args)
|
(`(or . ,args)
|
||||||
(funcall match args))
|
(funcall match args))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue