aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-04-03 16:37:39 +0000
committerChong Yidong2008-04-03 16:37:39 +0000
commitac1491a77fca2b30cbccc3e86e12e0534455df17 (patch)
tree272d2233e1d537d78bbd7b80379fe85e5f80b056
parent99d0850bdf22d42b44e6ac347bfdf9e1eb673ddf (diff)
downloademacs-ac1491a77fca2b30cbccc3e86e12e0534455df17.tar.gz
emacs-ac1491a77fca2b30cbccc3e86e12e0534455df17.zip
(handle-shift-selection): New arg.
-rw-r--r--lisp/simple.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 13517b8b916..4b5893eeb9f 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3648,7 +3648,7 @@ mode temporarily."
3648 (t (activate-mark))) 3648 (t (activate-mark)))
3649 nil)) 3649 nil))
3650 3650
3651(defun handle-shift-selection () 3651(defun handle-shift-selection (&optional deactivate)
3652 "Check for shift translation, and operate on the mark accordingly. 3652 "Check for shift translation, and operate on the mark accordingly.
3653This is called whenever a command with a `^' character in its 3653This is called whenever a command with a `^' character in its
3654`interactive' spec is invoked while `shift-select-mode' is 3654`interactive' spec is invoked while `shift-select-mode' is
@@ -3658,8 +3658,11 @@ If the command was invoked through shift-translation, set the
3658mark and activate the region temporarily, unless it was already 3658mark and activate the region temporarily, unless it was already
3659set in this way. If the command was invoked without 3659set in this way. If the command was invoked without
3660shift-translation and a region is temporarily active, deactivate 3660shift-translation and a region is temporarily active, deactivate
3661the mark." 3661the mark.
3662 (cond (this-command-keys-shift-translated 3662
3663With optional arg DEACTIVATE, only perform region deactivation."
3664 (cond ((and this-command-keys-shift-translated
3665 (null deactivate))
3663 (unless (and mark-active 3666 (unless (and mark-active
3664 (eq (car-safe transient-mark-mode) 'only)) 3667 (eq (car-safe transient-mark-mode) 'only))
3665 (setq transient-mark-mode 3668 (setq transient-mark-mode