[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 24e71050ea9 2/2: Fix rectangle commands when 'indent-tabs-mode' i

From: Eli Zaretskii
Subject: master 24e71050ea9 2/2: Fix rectangle commands when 'indent-tabs-mode' is non-nil
Date: Thu, 28 Dec 2023 04:00:36 -0500 (EST)

branch: master
commit 24e71050ea9f82979fadd320e8aaf9c8d58b72f2
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix rectangle commands when 'indent-tabs-mode' is non-nil
    * lisp/rect.el (delete-rectangle, kill-rectangle): Temporarily
    bind 'indent-tabs-mode' to nil.  (Bug#67925)
 lisp/rect.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/rect.el b/lisp/rect.el
index 9049e322ca6..525a1586434 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -282,7 +282,8 @@ When called from a program the rectangle's corners are 
 With a prefix (or a FILL) argument, also fill lines where nothing has
 to be deleted."
   (interactive "*r\nP")
-  (apply-on-rectangle 'delete-rectangle-line start end fill))
+  (let (indent-tabs-mode)
+    (apply-on-rectangle 'delete-rectangle-line start end fill)))
 (defun delete-extract-rectangle (start end &optional fill)
@@ -337,7 +338,8 @@ you can use this command to copy text from a read-only 
 even beep.)"
   (interactive "r\nP")
   (condition-case nil
-      (setq killed-rectangle (delete-extract-rectangle start end fill))
+      (let (indent-tabs-mode)
+        (setq killed-rectangle (delete-extract-rectangle start end fill)))
     ((buffer-read-only text-read-only)
      (setq deactivate-mark t)
      (setq killed-rectangle (extract-rectangle start end))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]