Subject: bug#27974: Acknowledgement (25.2; string-rectangle on-the-fly preview bad)

From: Noam Postavsky <[email-masked]>
Date: Sun, 15 Oct 2017 22:05:02 -0400

Bob Proulx <[email-masked]> writes:

> Let me suggest the following addition to the NEWS file.
>
>  *** 'string-rectangle' provides on-the-fly preview of the result.
> +This is controlled by the rectangle-preview variable.  Defaults to t.
> +Set (setq rectangle-preview nil) if you want the previous behavior.

I think it should also be documented in the docstring of
string-rectangle:

>From 4fd248152d15218e3f9f1d3747cebdad87062513 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <[email-masked]>
Date: Sun, 15 Oct 2017 17:09:09 -0400
Subject: [PATCH v2] Document rectangle-preview option more (Bug#27974)

* lisp/rect.el (string-rectangle):
* etc/NEWS.25: Mention `rectangle-preview'.
---
 etc/NEWS.25  | 2 ++
 lisp/rect.el | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/etc/NEWS.25 b/etc/NEWS.25
index 5201a300e0..aac60c4688 100644
--- a/etc/NEWS.25
+++ b/etc/NEWS.25
@@ -712,7 +712,9 @@ CLOS class and slot documentation.
 *** Rectangle Mark mode can have corners past EOL or in the middle of a TAB.
 
 *** 'C-x C-x' in 'rectangle-mark-mode' now cycles through the four corners.
+
 *** 'string-rectangle' provides on-the-fly preview of the result.
+Customize 'rectangle-preview' to nil for the old behavior.
 
 ** New font-lock functions 'font-lock-ensure' and 'font-lock-flush'.
 These should be used in preference to 'font-lock-fontify-buffer' when
diff --git a/lisp/rect.el b/lisp/rect.el
index 12e62b6a99..4ad7a98dda 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -450,6 +450,10 @@ string-rectangle
   "Replace rectangle contents with STRING on each line.
 The length of STRING need not be the same as the rectangle width.
 
+When called interactively and option `rectangle-preview' is
+non-nil, the result is previewed as the string is entered in the
+minibuffer.
+
 Called from a program, takes three args; START, END and STRING."
   (interactive
    (progn
-- 
2.11.0