(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)
;; 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)