[Top][All Lists]

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

emacs-27 22f4fba: * lisp/emulation/cua-rect.el (cua--rectangle-region-in

From: Juri Linkov
Subject: emacs-27 22f4fba: * lisp/emulation/cua-rect.el (cua--rectangle-region-insert): New function.
Date: Tue, 9 Jun 2020 19:03:16 -0400 (EDT)

branch: emacs-27
commit 22f4fba8a903874ba63f8f479fa40b1dfe12850f
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/emulation/cua-rect.el (cua--rectangle-region-insert): New function.
    Add cua--insert-rectangle around region-insert-function (bug#41440).
 lisp/emulation/cua-rect.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index e99bb33..663995a 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -1412,7 +1412,7 @@ With prefix arg, indent to that column."
 (add-function :around region-extract-function
 (add-function :around region-insert-function
-              #'cua--insert-rectangle)
+              #'cua--rectangle-region-insert)
 (add-function :around redisplay-highlight-region-function
@@ -1422,6 +1422,10 @@ With prefix arg, indent to that column."
     ;; already do it elsewhere.
     (funcall redisplay-unhighlight-region-function (nth 3 args))))
+(defun cua--rectangle-region-insert (orig &rest args)
+  (if (not cua--rectangle) (apply orig args)
+    (funcall #'cua--insert-rectangle (car args))))
 (defun cua--rectangle-region-extract (orig &optional delete)
    ((not cua--rectangle)

reply via email to

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