]> git.eshelyaron.com Git - emacs.git/commitdiff
; * src/editfns.c (Freplace_region_contents): Doc fix (bug#76313).
authorEli Zaretskii <eliz@gnu.org>
Sun, 13 Apr 2025 07:34:46 +0000 (10:34 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sun, 13 Apr 2025 20:54:11 +0000 (22:54 +0200)
(cherry picked from commit 7b36d7295e1567f5a1b3725ddbc3a7e85079660c)

src/editfns.c

index 969b1205db292cb7813abdc9ea8095e2f1a986b9..227f5f0be2cfa2f756fc7bbafb1790de805d114a 100644 (file)
@@ -1929,7 +1929,9 @@ properties from adjoining text.
 
 As far as possible the replacement is non-destructive, i.e. existing
 buffer contents, markers, properties, and overlays in the current
-buffer stay intact.
+buffer stay intact.  However, if point is at the end of the replaced
+text, it may not be at the end of the replacement when this function
+returns.
 
 Because this function can be very slow if there is a large number of
 differences between the two buffers, there are two optional arguments
@@ -1940,14 +1942,16 @@ for comparing the buffers.  If it takes longer than MAX-SECS, the
 function falls back to a plain `delete-region' and
 `insert-buffer-substring'.  (Note that the checks are not performed
 too evenly over time, so in some cases it may run a bit longer than
-allowed).
+allowed).  In partricular, passing zero as the value of MAX-SECS
+disables the comparison step, so this function immediately falls
+back to a plain delete/insert method.
 
 The optional argument MAX-COSTS defines the quality of the difference
 computation.  If the actual costs exceed this limit, heuristics are
 used to provide a faster but suboptimal solution.  The default value
 is 1000000.
 
-Note: If the replacement is a string, itll usually be placed internally
+Note: If the replacement is a string, it'll usually be placed internally
 in a temporary buffer.  Therefore, all else being equal, it is preferable
 to pass a buffer rather than a string as SOURCE argument.