diff --git a/lisp/subr.el b/lisp/subr.el index 164ed2a6f63..fa0ab09b0e7 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -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)) diff --git a/src/editfns.c b/src/editfns.c index 669d3cdb140..969b1205db2 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -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.