1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

; Fix more @var/@code mixups in Elisp manual

* doc/lispref/text.texi (Replacing): Fix markup for function
arguments.
This commit is contained in:
Basil L. Contovounesios 2020-05-28 00:12:54 +01:00
parent 313dc0439e
commit d0dd0e0612

View file

@ -4511,33 +4511,33 @@ would destroy these properties. However, the latter combination is
typically faster (@xref{Deletion}, and @ref{Insertion}). typically faster (@xref{Deletion}, and @ref{Insertion}).
For its working, @code{replace-buffer-contents} needs to compare the For its working, @code{replace-buffer-contents} needs to compare the
contents of the original buffer with that of @code{source} which is a contents of the original buffer with that of @var{source} which is a
costly operation if the buffers are huge and there is a high number of costly operation if the buffers are huge and there is a high number of
differences between them. In order to keep differences between them. In order to keep
@code{replace-buffer-contents}'s runtime in bounds, it has two @code{replace-buffer-contents}'s runtime in bounds, it has two
optional arguments. optional arguments.
@code{max-secs} defines a hard boundary in terms of seconds. If given @var{max-secs} defines a hard boundary in terms of seconds. If given
and exceeded, it will fall back to @code{delete-region} and and exceeded, it will fall back to @code{delete-region} and
@code{insert-buffer-substring}. @code{insert-buffer-substring}.
@code{max-costs} defines the quality of the difference computation. @var{max-costs} defines the quality of the difference computation. If
If the actual costs exceed this limit, heuristics are used to provide the actual costs exceed this limit, heuristics are used to provide a
a faster but suboptimal solution. The default value is 1000000. faster but suboptimal solution. The default value is 1000000.
@code{replace-buffer-contents} returns t if a non-destructive @code{replace-buffer-contents} returns t if a non-destructive
replacement could be performed. Otherwise, i.e., if @code{max-secs} replacement could be performed. Otherwise, i.e., if @var{max-secs}
was exceeded, it returns nil. was exceeded, it returns nil.
@end deffn @end deffn
@defun replace-region-contents beg end replace-fn &optional max-secs max-costs @defun replace-region-contents beg end replace-fn &optional max-secs max-costs
This function replaces the region between @code{beg} and @code{end} This function replaces the region between @var{beg} and @var{end}
using the given @code{replace-fn}. The function @code{replace-fn} is using the given @var{replace-fn}. The function @var{replace-fn} is
run in the current buffer narrowed to the specified region and it run in the current buffer narrowed to the specified region and it
should return either a string or a buffer replacing the region. should return either a string or a buffer replacing the region.
The replacement is performed using @code{replace-buffer-contents} (see The replacement is performed using @code{replace-buffer-contents} (see
above) which also describes the @code{max-secs} and @code{max-costs} above) which also describes the @var{max-secs} and @var{max-costs}
arguments and the return value. arguments and the return value.
Note: If the replacement is a string, it will be placed in a temporary Note: If the replacement is a string, it will be placed in a temporary