aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorChong Yidong2010-08-15 22:33:17 -0400
committerChong Yidong2010-08-15 22:33:17 -0400
commit7c23dd4468eb42dbe7e3f40339c6fda9f9905d0e (patch)
treefc6daa2c1cf95788332e4216b8293dc5616ee73b /lisp
parent6d3e82d2d656d7ed27b374f62c320c7d58348248 (diff)
downloademacs-7c23dd4468eb42dbe7e3f40339c6fda9f9905d0e.tar.gz
emacs-7c23dd4468eb42dbe7e3f40339c6fda9f9905d0e.zip
Let all active regions set the primary selection.
This includes both temporarily active regions (mouse drag and shift-select) and those made with C-SPC and cursor motion. * lisp/cus-start.el: Change defcustom for select-active-regions. * lisp/simple.el (deactivate-mark): If select-active-regions is `only', only set selection for temporarily active regions. * src/insdel.c (prepare_to_modify_buffer): Handle `only' value of select-active-regions. * src/keyboard.c (command_loop_1): Avoid setting selection twice, since it's done in deactivate-mark as well. (Vselect_active_regions): Replace `lazy' value with `only', meaning to only set PRIMARY for temporarily active regions.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/cus-start.el4
-rw-r--r--lisp/simple.el4
3 files changed, 12 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index dfe19e994ce..aad818634b9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12010-08-16 Chong Yidong <cyd@stupidchicken.com>
2
3 * simple.el (deactivate-mark): If select-active-regions is `only',
4 only set selection for temporarily active regions.
5
6 * cus-start.el: Change defcustom for select-active-regions.
7
12010-08-15 Chong Yidong <cyd@stupidchicken.com> 82010-08-15 Chong Yidong <cyd@stupidchicken.com>
2 9
3 * mouse.el (mouse--drag-set-mark-and-point): New function. 10 * mouse.el (mouse--drag-set-mark-and-point): New function.
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 10214d39a0d..ec05eb7c9b0 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -198,8 +198,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
198 (help-event-list keyboard (repeat (sexp :format "%v"))) 198 (help-event-list keyboard (repeat (sexp :format "%v")))
199 (menu-prompting menu boolean) 199 (menu-prompting menu boolean)
200 (select-active-regions killing 200 (select-active-regions killing
201 (choice (const :tag "lazy" lazy) 201 (choice (const :tag "always" t)
202 (const :tag "always" t) 202 (const :tag "only shift-selection or mouse-drag" only)
203 (const :tag "off" nil)) 203 (const :tag "off" nil))
204 "24.1") 204 "24.1")
205 (suggest-key-bindings keyboard (choice (const :tag "off" nil) 205 (suggest-key-bindings keyboard (choice (const :tag "off" nil)
diff --git a/lisp/simple.el b/lisp/simple.el
index 0ac199ea2f6..5a2c9e70ad6 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3674,7 +3674,9 @@ Unless FORCE is non-nil, this function does nothing if Transient
3674Mark mode is disabled. 3674Mark mode is disabled.
3675This function also runs `deactivate-mark-hook'." 3675This function also runs `deactivate-mark-hook'."
3676 (when (or transient-mark-mode force) 3676 (when (or transient-mark-mode force)
3677 (when (and select-active-regions 3677 (when (and (if (eq select-active-regions 'only)
3678 (eq (car-safe transient-mark-mode) 'only)
3679 select-active-regions)
3678 (region-active-p) 3680 (region-active-p)
3679 (display-selections-p)) 3681 (display-selections-p))
3680 ;; The var `saved-region-selection', if non-nil, is the text in 3682 ;; The var `saved-region-selection', if non-nil, is the text in