diff options
| author | Chong Yidong | 2008-04-03 16:37:39 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-04-03 16:37:39 +0000 |
| commit | ac1491a77fca2b30cbccc3e86e12e0534455df17 (patch) | |
| tree | 272d2233e1d537d78bbd7b80379fe85e5f80b056 | |
| parent | 99d0850bdf22d42b44e6ac347bfdf9e1eb673ddf (diff) | |
| download | emacs-ac1491a77fca2b30cbccc3e86e12e0534455df17.tar.gz emacs-ac1491a77fca2b30cbccc3e86e12e0534455df17.zip | |
(handle-shift-selection): New arg.
| -rw-r--r-- | lisp/simple.el | 9 |
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. |
| 3653 | This is called whenever a command with a `^' character in its | 3653 | This 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 | |||
| 3658 | mark and activate the region temporarily, unless it was already | 3658 | mark and activate the region temporarily, unless it was already |
| 3659 | set in this way. If the command was invoked without | 3659 | set in this way. If the command was invoked without |
| 3660 | shift-translation and a region is temporarily active, deactivate | 3660 | shift-translation and a region is temporarily active, deactivate |
| 3661 | the mark." | 3661 | the mark. |
| 3662 | (cond (this-command-keys-shift-translated | 3662 | |
| 3663 | With 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 |