diff options
| author | Juri Linkov | 2020-06-10 02:03:06 +0300 |
|---|---|---|
| committer | Juri Linkov | 2020-06-10 02:03:06 +0300 |
| commit | 22f4fba8a903874ba63f8f479fa40b1dfe12850f (patch) | |
| tree | 7388425610f6ac187ee43ad7b32e079a6a2fc2c1 | |
| parent | 6b9eac67590cf4396cdde5a21ace8e96d30a1ea2 (diff) | |
| download | emacs-22f4fba8a903874ba63f8f479fa40b1dfe12850f.tar.gz emacs-22f4fba8a903874ba63f8f479fa40b1dfe12850f.zip | |
* lisp/emulation/cua-rect.el (cua--rectangle-region-insert): New function.
Add cua--insert-rectangle around region-insert-function (bug#41440).
| -rw-r--r-- | lisp/emulation/cua-rect.el | 6 |
1 files changed, 5 insertions, 1 deletions
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." | |||
| 1412 | (add-function :around region-extract-function | 1412 | (add-function :around region-extract-function |
| 1413 | #'cua--rectangle-region-extract) | 1413 | #'cua--rectangle-region-extract) |
| 1414 | (add-function :around region-insert-function | 1414 | (add-function :around region-insert-function |
| 1415 | #'cua--insert-rectangle) | 1415 | #'cua--rectangle-region-insert) |
| 1416 | (add-function :around redisplay-highlight-region-function | 1416 | (add-function :around redisplay-highlight-region-function |
| 1417 | #'cua--rectangle-highlight-for-redisplay) | 1417 | #'cua--rectangle-highlight-for-redisplay) |
| 1418 | 1418 | ||
| @@ -1422,6 +1422,10 @@ With prefix arg, indent to that column." | |||
| 1422 | ;; already do it elsewhere. | 1422 | ;; already do it elsewhere. |
| 1423 | (funcall redisplay-unhighlight-region-function (nth 3 args)))) | 1423 | (funcall redisplay-unhighlight-region-function (nth 3 args)))) |
| 1424 | 1424 | ||
| 1425 | (defun cua--rectangle-region-insert (orig &rest args) | ||
| 1426 | (if (not cua--rectangle) (apply orig args) | ||
| 1427 | (funcall #'cua--insert-rectangle (car args)))) | ||
| 1428 | |||
| 1425 | (defun cua--rectangle-region-extract (orig &optional delete) | 1429 | (defun cua--rectangle-region-extract (orig &optional delete) |
| 1426 | (cond | 1430 | (cond |
| 1427 | ((not cua--rectangle) | 1431 | ((not cua--rectangle) |