1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-07 16:10:46 -08:00

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)
This commit is contained in:
Eli Zaretskii 2023-12-28 10:56:33 +02:00
parent 6abf1c038f
commit 24e71050ea

View file

@ -282,7 +282,8 @@ When called from a program the rectangle's corners are START and END.
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)))
;;;###autoload
(defun delete-extract-rectangle (start end &optional fill)
@ -337,7 +338,8 @@ you can use this command to copy text from a read-only buffer.
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))