(replace-buffer-contents): Mark as obsolete, again.

* lisp/subr.el (replace-buffer-contents): Mark as obsolete, again.
* src/editfns.c (Freplace_region_contents): Add interactive form.
This commit is contained in:
Stefan Monnier 2025-04-12 22:58:22 -04:00
parent 356178c8e7
commit b99893af1e
2 changed files with 5 additions and 1 deletions

View file

@ -4772,6 +4772,7 @@ Interactively, prompt for SOURCE.
The replacement is performed using `replace-region-contents'
which also describes the MAX-SECS and MAX-COSTS arguments and the
return value."
(declare (obsolete replace-region-contents "31.1"))
(interactive "bSource buffer: ")
(replace-region-contents (point-min) (point-max) (get-buffer source)
max-secs max-costs))

View file

@ -1916,7 +1916,10 @@ static bool compareseq_early_abort (struct context *);
#include "diffseq.h"
DEFUN ("replace-region-contents", Freplace_region_contents,
Sreplace_region_contents, 3, 6, 0,
Sreplace_region_contents, 3, 6,
"(list (if (use-region-p) (region-beginning) (point-min)) \
(if (use-region-p) (region-end) (point-max)) \
(get-buffer (read-buffer-to-switch \"Source buffer: \")))",
doc: /* Replace the region between BEG and END with that of SOURCE.
SOURCE can be a buffer, a string, or a vector [SBUF SBEG SEND]
denoting the subtring SBEG..SEND of buffer SBUF.