]> code.delx.au - gnu-emacs/blobdiff - lisp/mouse.el
Speed up keyboard auto-repeat cursor motion under bidi redisplay.
[gnu-emacs] / lisp / mouse.el
index f35069763bd070a5e28d07cdc0c0f3c94d59023b..63395619f4405455b0027e57aeb295f71efd10ac 100644 (file)
@@ -687,7 +687,9 @@ This should be bound to a mouse click event type."
 
 (defun mouse-set-region (click)
   "Set the region to the text dragged over, and copy to kill ring.
-This should be bound to a mouse drag event."
+This should be bound to a mouse drag event.
+See the `mouse-drag-copy-region' variable to control whether this
+command alters the kill ring or not."
   (interactive "e")
   (mouse-minibuffer-check click)
   (select-window (posn-window (event-start click)))
@@ -2092,17 +2094,19 @@ choose a font."
 (global-set-key [double-mouse-1] 'mouse-set-point)
 (global-set-key [triple-mouse-1] 'mouse-set-point)
 
-;; Clicking on the fringes causes hscrolling:
-(global-set-key [left-fringe mouse-1]  'mouse-set-point)
-(global-set-key [right-fringe mouse-1] 'mouse-set-point)
+(defun mouse--strip-first-event (_prompt)
+  (substring (this-single-command-raw-keys) 1))
+
+(define-key function-key-map [left-fringe mouse-1] 'mouse--strip-first-event)
+(define-key function-key-map [right-fringe mouse-1] 'mouse--strip-first-event)
 
 (global-set-key [mouse-2]      'mouse-yank-primary)
 ;; Allow yanking also when the corresponding cursor is "in the fringe".
-(global-set-key [right-fringe mouse-2] 'mouse-yank-at-click)
-(global-set-key [left-fringe mouse-2] 'mouse-yank-at-click)
+(define-key function-key-map [right-fringe mouse-2] 'mouse--strip-first-event)
+(define-key function-key-map [left-fringe mouse-2] 'mouse--strip-first-event)
 (global-set-key [mouse-3]      'mouse-save-then-kill)
-(global-set-key [right-fringe mouse-3] 'mouse-save-then-kill)
-(global-set-key [left-fringe mouse-3]  'mouse-save-then-kill)
+(define-key function-key-map [right-fringe mouse-3] 'mouse--strip-first-event)
+(define-key function-key-map [left-fringe mouse-3] 'mouse--strip-first-event)
 
 ;; By binding these to down-going events, we let the user use the up-going
 ;; event to make the selection, saving a click.