From: Chong Yidong Date: Thu, 3 Apr 2008 16:37:39 +0000 (+0000) Subject: (handle-shift-selection): New arg. X-Git-Tag: emacs-pretest-23.0.90~6623 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ac1491a77fca2b30cbccc3e86e12e0534455df17;p=emacs.git (handle-shift-selection): New arg. --- 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." (t (activate-mark))) nil)) -(defun handle-shift-selection () +(defun handle-shift-selection (&optional deactivate) "Check for shift translation, and operate on the mark accordingly. This is called whenever a command with a `^' character in its `interactive' spec is invoked while `shift-select-mode' is @@ -3658,8 +3658,11 @@ If the command was invoked through shift-translation, set the mark and activate the region temporarily, unless it was already set in this way. If the command was invoked without shift-translation and a region is temporarily active, deactivate -the mark." - (cond (this-command-keys-shift-translated +the mark. + +With optional arg DEACTIVATE, only perform region deactivation." + (cond ((and this-command-keys-shift-translated + (null deactivate)) (unless (and mark-active (eq (car-safe transient-mark-mode) 'only)) (setq transient-mark-mode