aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/rect.el
diff options
context:
space:
mode:
authorStefan Monnier2013-12-15 21:24:08 -0500
committerStefan Monnier2013-12-15 21:24:08 -0500
commit2013a2f955e4dc6edf9869767e9f5d70fbf9d69c (patch)
treed641c6fe8fc0b763645a5447f1fda75987cc4ac0 /lisp/rect.el
parentdb50ad5f11cc5809c27091181a13ee7aa34ec5ed (diff)
downloademacs-2013a2f955e4dc6edf9869767e9f5d70fbf9d69c.tar.gz
emacs-2013a2f955e4dc6edf9869767e9f5d70fbf9d69c.zip
* lisp/emulation/cua-rect.el (cua-rectangle-mark-mode): New minor mode.
(cua--deactivate-rectangle): Don't deactivate the mark. (cua-set-rectangle-mark): Don't set mark-active since cua--activate-rectangle already does it for us. (cua--rectangle-highlight-for-redisplay): Unhighlight a previous non-rectangular region. * lisp/emulation/cua-base.el (cua-repeat-replace-region): Use with-current-buffer. * lisp/net/gnutls.el: Use cl-lib. (gnutls-negotiate): `mapcan' -> cl-mapcan.
Diffstat (limited to 'lisp/rect.el')
-rw-r--r--lisp/rect.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/rect.el b/lisp/rect.el
index be29517e087..cece0950880 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -418,9 +418,6 @@ with a prefix argument, prompt for START-AT and FORMAT."
418;; - lots of commands handle the region without paying attention to its 418;; - lots of commands handle the region without paying attention to its
419;; rectangular shape. 419;; rectangular shape.
420 420
421(add-hook 'deactivate-mark-hook
422 (lambda () (rectangle-mark-mode -1)))
423
424(add-function :around redisplay-highlight-region-function 421(add-function :around redisplay-highlight-region-function
425 #'rectangle--highlight-for-redisplay) 422 #'rectangle--highlight-for-redisplay)
426(add-function :around redisplay-unhighlight-region-function 423(add-function :around redisplay-unhighlight-region-function
@@ -443,6 +440,8 @@ with a prefix argument, prompt for START-AT and FORMAT."
443Activates the region if needed. Only lasts until the region is deactivated." 440Activates the region if needed. Only lasts until the region is deactivated."
444 nil nil nil 441 nil nil nil
445 (when rectangle-mark-mode 442 (when rectangle-mark-mode
443 (add-hook 'deactivate-mark-hook
444 (lambda () (rectangle-mark-mode -1)))
446 (unless (region-active-p) 445 (unless (region-active-p)
447 (push-mark) 446 (push-mark)
448 (activate-mark)))) 447 (activate-mark))))