From: Juri Linkov Date: Tue, 9 Jun 2020 23:03:06 +0000 (+0300) Subject: * lisp/emulation/cua-rect.el (cua--rectangle-region-insert): New function. X-Git-Tag: emacs-27.1-rc1~71 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=22f4fba8a9;p=emacs.git * lisp/emulation/cua-rect.el (cua--rectangle-region-insert): New function. Add cua--insert-rectangle around region-insert-function (bug#41440). --- diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index e99bb33dfb1..663995a0a11 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 #'cua--rectangle-region-extract) (add-function :around region-insert-function - #'cua--insert-rectangle) + #'cua--rectangle-region-insert) (add-function :around redisplay-highlight-region-function #'cua--rectangle-highlight-for-redisplay) @@ -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) (cond ((not cua--rectangle)