aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBastien Guerry2014-01-13 11:55:22 +0100
committerBastien Guerry2014-01-13 11:55:22 +0100
commitd791cc3bc2781435f7b54fb9b45c690c7e4e0ee6 (patch)
treeeeea873b6b5bbb88cc964c33c1d08456696a8aa1
parent6a1f3c119c3a67e781eacbd0756db83ba365c185 (diff)
downloademacs-d791cc3bc2781435f7b54fb9b45c690c7e4e0ee6.tar.gz
emacs-d791cc3bc2781435f7b54fb9b45c690c7e4e0ee6.zip
Partially fix Bug#16403.
* rect.el (rectangle-mark-mode): When the region is not active, display a message saying that the mark as been set and that rectangle mode is in use. (rectangle--highlight-for-redisplay): Only put an overlay with a visible vertical bar when (display-graphic-p) is non-nil. This partially fixes Bug#16403.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/rect.el9
2 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 93436bf3cb3..c0b693340f5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12014-01-13 Bastien Guerry <bzg@gnu.org>
2
3 * rect.el (rectangle-mark-mode): When the region is not active,
4 display a message saying that the mark as been set and that
5 rectangle mode is in use.
6 (rectangle--highlight-for-redisplay): Only put an overlay with a
7 visible vertical bar when (display-graphic-p) is non-nil.
8 This partially fixes Bug#16403.
9
12014-01-13 Juri Linkov <juri@jurta.org> 102014-01-13 Juri Linkov <juri@jurta.org>
2 11
3 * info.el (Info-find-file): Go to DIR before displaying the error 12 * info.el (Info-find-file): Go to DIR before displaying the error
diff --git a/lisp/rect.el b/lisp/rect.el
index f1f0b8dd9de..e798b07b556 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -444,7 +444,8 @@ Activates the region if needed. Only lasts until the region is deactivated."
444 (lambda () (rectangle-mark-mode -1))) 444 (lambda () (rectangle-mark-mode -1)))
445 (unless (region-active-p) 445 (unless (region-active-p)
446 (push-mark) 446 (push-mark)
447 (activate-mark)))) 447 (activate-mark)
448 (message "Mark set (rectangle mode)"))))
448 449
449(defun rectangle--extract-region (orig &optional delete) 450(defun rectangle--extract-region (orig &optional delete)
450 (if (not rectangle-mark-mode) 451 (if (not rectangle-mark-mode)
@@ -553,10 +554,10 @@ Activates the region if needed. Only lasts until the region is deactivated."
553 (overlay-put ol 'after-string str)))) 554 (overlay-put ol 'after-string str))))
554 ((overlay-get ol 'after-string) 555 ((overlay-get ol 'after-string)
555 (overlay-put ol 'after-string nil))) 556 (overlay-put ol 'after-string nil)))
556 (when (= leftcol rightcol) 557 (when (and (= leftcol rightcol) (display-graphic-p))
557 ;; Make zero-width rectangles visible! 558 ;; Make zero-width rectangles visible!
558 (overlay-put ol 'after-string 559 (overlay-put ol 'after-string
559 (concat (propertize " " 560 (concat (propertize " "
560 'face '(region (:height 0.2))) 561 'face '(region (:height 0.2)))
561 (overlay-get ol 'after-string)))) 562 (overlay-get ol 'after-string))))
562 (push ol nrol) 563 (push ol nrol)