# HG changeset patch # User Chong Yidong # Date 1207240659 0 # Node ID fbde6ee8b4289e485e1d0dbe404154af230bcf74 # Parent 149c271d4dcdf3977267d24be73b6a21a1413fa7 (handle-shift-selection): New arg. diff -r 149c271d4dcd -r fbde6ee8b428 lisp/simple.el --- a/lisp/simple.el Thu Apr 03 16:37:12 2008 +0000 +++ b/lisp/simple.el Thu Apr 03 16:37:39 2008 +0000 @@ -3648,7 +3648,7 @@ (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 @@ 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