comparison lisp/mouse.el @ 109398:c9970d4bfd62

Change clipboard/primary selection to X application standards. * lisp/menu-bar.el (menu-bar-enable-clipboard): Don't overwrite Cut/Copy/Paste menu bar items. * lisp/mouse.el: Bind mouse-2 to mouse-yank-primary. (mouse-drag-copy-region): Default to nil. * lisp/simple.el (select-active-regions): Default to t. (push-mark-command): Don't overwrite primary with empty string. * lisp/term/x-win.el (x-select-enable-clipboard): Default to t. (x-initialize-window-system): Don't overwrite Paste menu item.
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 14 Jul 2010 14:03:39 -0400
parents 02b388bb2a4b
children 334eb7871775
comparison
equal deleted inserted replaced
109397:4e6b8160da4b 109398:c9970d4bfd62
39 (defcustom mouse-yank-at-point nil 39 (defcustom mouse-yank-at-point nil
40 "If non-nil, mouse yank commands yank at point instead of at click." 40 "If non-nil, mouse yank commands yank at point instead of at click."
41 :type 'boolean 41 :type 'boolean
42 :group 'mouse) 42 :group 'mouse)
43 43
44 (defcustom mouse-drag-copy-region t 44 (defcustom mouse-drag-copy-region nil
45 "If non-nil, mouse drag copies region to kill-ring." 45 "If non-nil, mouse drag copies region to kill-ring."
46 :type 'boolean 46 :type 'boolean
47 :version "22.1" 47 :version "22.1"
48 :group 'mouse) 48 :group 'mouse)
49 49
2441 2441
2442 ;; Clicking on the fringes causes hscrolling: 2442 ;; Clicking on the fringes causes hscrolling:
2443 (global-set-key [left-fringe mouse-1] 'mouse-set-point) 2443 (global-set-key [left-fringe mouse-1] 'mouse-set-point)
2444 (global-set-key [right-fringe mouse-1] 'mouse-set-point) 2444 (global-set-key [right-fringe mouse-1] 'mouse-set-point)
2445 2445
2446 (global-set-key [mouse-2] 'mouse-yank-at-click) 2446 (global-set-key [mouse-2] 'mouse-yank-primary)
2447 ;; Allow yanking also when the corresponding cursor is "in the fringe". 2447 ;; Allow yanking also when the corresponding cursor is "in the fringe".
2448 (global-set-key [right-fringe mouse-2] 'mouse-yank-at-click) 2448 (global-set-key [right-fringe mouse-2] 'mouse-yank-at-click)
2449 (global-set-key [left-fringe mouse-2] 'mouse-yank-at-click) 2449 (global-set-key [left-fringe mouse-2] 'mouse-yank-at-click)
2450 (global-set-key [mouse-3] 'mouse-save-then-kill) 2450 (global-set-key [mouse-3] 'mouse-save-then-kill)
2451 (global-set-key [right-fringe mouse-3] 'mouse-save-then-kill) 2451 (global-set-key [right-fringe mouse-3] 'mouse-save-then-kill)