* lisp/emulation/cua-rect.el (cua--rectangle-region-insert): New function.

Add cua--insert-rectangle around region-insert-function (bug#41440).
This commit is contained in:
Juri Linkov 2020-06-10 02:03:06 +03:00
parent 6b9eac6759
commit 22f4fba8a9

View file

@ -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)