diff options
| author | Mark Oteiza | 2016-04-16 11:55:59 -0400 |
|---|---|---|
| committer | Mark Oteiza | 2016-04-16 12:04:52 -0400 |
| commit | aa0d83a727aa8868911d68f03d0b6e6ae37ff017 (patch) | |
| tree | a80ebf89f1747b01442670b6167ee92cc556e838 | |
| parent | 33bef6e90bfd20609d044b8a076c1570c627684a (diff) | |
| download | emacs-aa0d83a727aa8868911d68f03d0b6e6ae37ff017.tar.gz emacs-aa0d83a727aa8868911d68f03d0b6e6ae37ff017.zip | |
Make use of rectangle-preview face.
* lisp/rect.el (rectangle--string-preview):
(rectangle--highlight-for-redisplay): Replace 'region with
'rectangle-preview (Bug#23248).
| -rw-r--r-- | lisp/rect.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/rect.el b/lisp/rect.el index 685213a0635..fc087477a56 100644 --- a/lisp/rect.el +++ b/lisp/rect.el | |||
| @@ -412,7 +412,7 @@ With a prefix (or a FILL) argument, also fill too short lines." | |||
| 412 | (when (equal str "") | 412 | (when (equal str "") |
| 413 | (setq str (or (car-safe minibuffer-default) | 413 | (setq str (or (car-safe minibuffer-default) |
| 414 | (if (stringp minibuffer-default) minibuffer-default)))) | 414 | (if (stringp minibuffer-default) minibuffer-default)))) |
| 415 | (when str (setq str (propertize str 'face 'region))) | 415 | (when str (setq str (propertize str 'face 'rectangle-preview))) |
| 416 | (with-selected-window rectangle--string-preview-window | 416 | (with-selected-window rectangle--string-preview-window |
| 417 | (unless (or (null rectangle--string-preview-state) | 417 | (unless (or (null rectangle--string-preview-state) |
| 418 | (equal str (car rectangle--string-preview-state))) | 418 | (equal str (car rectangle--string-preview-state))) |
| @@ -782,7 +782,7 @@ Ignores `line-move-visual'." | |||
| 782 | (if (not old) | 782 | (if (not old) |
| 783 | (let ((ol (make-overlay left right))) | 783 | (let ((ol (make-overlay left right))) |
| 784 | (overlay-put ol 'window window) | 784 | (overlay-put ol 'window window) |
| 785 | (overlay-put ol 'face 'region) | 785 | (overlay-put ol 'face 'rectangle-preview) |
| 786 | ol) | 786 | ol) |
| 787 | (let ((ol (pop old))) | 787 | (let ((ol (pop old))) |
| 788 | (move-overlay ol left right (current-buffer)) | 788 | (move-overlay ol left right (current-buffer)) |
| @@ -814,7 +814,7 @@ Ignores `line-move-visual'." | |||
| 814 | (overlay-put ol 'after-string nil))) | 814 | (overlay-put ol 'after-string nil))) |
| 815 | ((< mright rightcol) ;`rightcol' is past EOL. | 815 | ((< mright rightcol) ;`rightcol' is past EOL. |
| 816 | (let ((str (rectangle--space-to rightcol))) | 816 | (let ((str (rectangle--space-to rightcol))) |
| 817 | (put-text-property 0 (length str) 'face 'region str) | 817 | (put-text-property 0 (length str) 'face 'rectangle-preview str) |
| 818 | ;; If cursor happens to be here, draw it at the right place. | 818 | ;; If cursor happens to be here, draw it at the right place. |
| 819 | (rectangle--place-cursor leftcol left str) | 819 | (rectangle--place-cursor leftcol left str) |
| 820 | (overlay-put ol 'after-string str))) | 820 | (overlay-put ol 'after-string str))) |
| @@ -826,7 +826,7 @@ Ignores `line-move-visual'." | |||
| 826 | (overlay-put ol 'after-string nil) | 826 | (overlay-put ol 'after-string nil) |
| 827 | (goto-char right) | 827 | (goto-char right) |
| 828 | (let ((str (rectangle--space-to rightcol))) | 828 | (let ((str (rectangle--space-to rightcol))) |
| 829 | (put-text-property 0 (length str) 'face 'region str) | 829 | (put-text-property 0 (length str) 'face 'rectangle-preview str) |
| 830 | (when (= left right) | 830 | (when (= left right) |
| 831 | (rectangle--place-cursor leftcol left str)) | 831 | (rectangle--place-cursor leftcol left str)) |
| 832 | (overlay-put ol 'after-string str)))) | 832 | (overlay-put ol 'after-string str)))) |
| @@ -836,7 +836,7 @@ Ignores `line-move-visual'." | |||
| 836 | ;; Make zero-width rectangles visible! | 836 | ;; Make zero-width rectangles visible! |
| 837 | (overlay-put ol 'after-string | 837 | (overlay-put ol 'after-string |
| 838 | (concat (propertize " " | 838 | (concat (propertize " " |
| 839 | 'face '(region (:height 0.2))) | 839 | 'face '(rectangle-preview (:height 0.2))) |
| 840 | (overlay-get ol 'after-string)))) | 840 | (overlay-get ol 'after-string)))) |
| 841 | (push ol nrol))) | 841 | (push ol nrol))) |
| 842 | start end)) | 842 | start end)) |