From: Eli Zaretskii Date: Sat, 6 Jan 2024 13:20:19 +0000 (-0500) Subject: Merge from origin/emacs-29 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5256b8dd4ebf163aa67ed50eb72168d965583caf;p=emacs.git Merge from origin/emacs-29 bf7034048c1 ; * doc/emacs/custom.texi (Changing a Variable): Update e... 466d1c98a9e Fix icons.el when icon does not exist as a file 2a861124e89 ; Improve documentation of 'buffer-match-p' dc9d02f8a01 * lisp/isearch.el (isearch-search-and-update): Let-bind '... 9308d9a74ab * src/comp.c (Fcomp__compile_ctxt_to_file): Fix hash tabl... a2a6619b282 Provide decent documentation for 'help-quick' ab66b749a27 ; * src/window.c (Fset_window_margins): Doc fix. 1a677d1429d treesit--pre-syntax-ppss: Fix args-out-of-range in intern... --- 5256b8dd4ebf163aa67ed50eb72168d965583caf diff --cc doc/lispref/buffers.texi index 6a5367c17ba,f67a954edc5..4994d8c2252 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi @@@ -957,10 -957,10 +957,10 @@@ with a @code{nil} @var{norecord} argume infinite recursion. @end defvar -@defun buffer-match-p condition buffer-or-name &optional arg +@defun buffer-match-p condition buffer-or-name &rest args This function checks if a buffer designated by @code{buffer-or-name} - satisfies the specified @code{condition}. Optional arguments - @var{args} are passed to the predicate function in @var{condition}. A + satisfies the specified @var{condition}. Optional third argument + @var{arg} is passed to the predicate function in @var{condition}. A valid @var{condition} can be one of the following: @itemize @bullet{} @item @@@ -977,18 -979,23 +977,23 @@@ o @table @code @item (not @var{cond}) Satisfied if @var{cond} doesn't satisfy @code{buffer-match-p} with -the same buffer and @code{arg}. +the same buffer and @code{args}. @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}. +@code{buffer-match-p}, with the same buffer and @code{args}. @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}. +@code{buffer-match-p}, with the same buffer and @code{args}. @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}. Note + that this condition might fail to report a match if + @code{buffer-match-p} is invoked before the major mode of the buffer + has been established. @item major-mode Satisfied if the buffer's major mode is equal to @var{expr}. Prefer - using @code{derived-mode} instead, when both can work. + using @code{derived-mode} instead, when both can work. Note that this + condition might fail to report a match if @code{buffer-match-p} is + invoked before the major mode of the buffer has been established. @end table @item t Satisfied by any buffer. A convenient alternative to @code{""} (empty @@@ -996,9 -1003,9 +1001,9 @@@ string) or @code{(and)} (empty conjunct @end itemize @end defun -@defun match-buffers condition &optional buffer-list arg +@defun match-buffers condition &optional buffer-list &rest args This function returns a list of all buffers that satisfy the - @code{condition}. If no buffers match, the function returns + @var{condition}. If no buffers match, the function returns @code{nil}. The argument @var{condition} is as defined in @code{buffer-match-p} above. By default, all the buffers are considered, but this can be restricted via the optional argument