]> git.eshelyaron.com Git - emacs.git/commitdiff
(replace-buffer-contents): Mark as obsolete, again.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 13 Apr 2025 02:58:22 +0000 (22:58 -0400)
committerEshel Yaron <me@eshelyaron.com>
Sun, 13 Apr 2025 20:53:49 +0000 (22:53 +0200)
* lisp/subr.el (replace-buffer-contents): Mark as obsolete, again.
* src/editfns.c (Freplace_region_contents): Add interactive form.

(cherry picked from commit b99893af1ec373bf96c3326fa6f77740de55e621)

lisp/subr.el
src/editfns.c

index f7ad454d81f744f6e01ef2090db4700db0b11e00..1ddb19cc084a6d4468b8cc4c9498e025037c171f 100644 (file)
@@ -4366,6 +4366,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))
index 669d3cdb140f49b1ae7be81a32ce80f7948838f8..969b1205db292cb7813abdc9ea8095e2f1a986b9 100644 (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.