aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/mouse.el38
1 files changed, 12 insertions, 26 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 6a98ee7353f..66b8a852e70 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -41,8 +41,7 @@
41 41
42(defcustom mouse-yank-at-point nil 42(defcustom mouse-yank-at-point nil
43 "If non-nil, mouse yank commands yank at point instead of at click." 43 "If non-nil, mouse yank commands yank at point instead of at click."
44 :type 'boolean 44 :type 'boolean)
45 :group 'mouse)
46 45
47(defcustom mouse-drag-copy-region nil 46(defcustom mouse-drag-copy-region nil
48 "If non-nil, copy to kill-ring upon mouse adjustments of the region. 47 "If non-nil, copy to kill-ring upon mouse adjustments of the region.
@@ -50,8 +49,7 @@
50This affects `mouse-save-then-kill' (\\[mouse-save-then-kill]) in 49This affects `mouse-save-then-kill' (\\[mouse-save-then-kill]) in
51addition to mouse drags." 50addition to mouse drags."
52 :type 'boolean 51 :type 'boolean
53 :version "24.1" 52 :version "24.1")
54 :group 'mouse)
55 53
56(defcustom mouse-1-click-follows-link 450 54(defcustom mouse-1-click-follows-link 450
57 "Non-nil means that clicking Mouse-1 on a link follows the link. 55 "Non-nil means that clicking Mouse-1 on a link follows the link.
@@ -83,8 +81,7 @@ packages. See `mouse-on-link-p' for details."
83 :type '(choice (const :tag "Disabled" nil) 81 :type '(choice (const :tag "Disabled" nil)
84 (const :tag "Double click" double) 82 (const :tag "Double click" double)
85 (number :tag "Single click time limit" :value 450) 83 (number :tag "Single click time limit" :value 450)
86 (other :tag "Single click" t)) 84 (other :tag "Single click" t)))
87 :group 'mouse)
88 85
89(defcustom mouse-1-click-in-non-selected-windows t 86(defcustom mouse-1-click-in-non-selected-windows t
90 "If non-nil, a Mouse-1 click also follows links in non-selected windows. 87 "If non-nil, a Mouse-1 click also follows links in non-selected windows.
@@ -93,8 +90,7 @@ If nil, a Mouse-1 click on a link in a non-selected window performs
93the normal mouse-1 binding, typically selects the window and sets 90the normal mouse-1 binding, typically selects the window and sets
94point at the click position." 91point at the click position."
95 :type 'boolean 92 :type 'boolean
96 :version "22.1" 93 :version "22.1")
97 :group 'mouse)
98 94
99(defvar mouse--last-down nil) 95(defvar mouse--last-down nil)
100 96
@@ -921,7 +917,6 @@ Nil means keep point at the position clicked (region end);
921non-nil means move point to beginning of region." 917non-nil means move point to beginning of region."
922 :type '(choice (const :tag "Don't move point" nil) 918 :type '(choice (const :tag "Don't move point" nil)
923 (const :tag "Move point to beginning of region" t)) 919 (const :tag "Move point to beginning of region" t))
924 :group 'mouse
925 :version "26.1") 920 :version "26.1")
926 921
927(defun mouse-set-point (event &optional promote-to-region) 922(defun mouse-set-point (event &optional promote-to-region)
@@ -1027,8 +1022,7 @@ this many seconds between scroll steps. Scrolling stops when you move
1027the mouse back into the window, or release the button. 1022the mouse back into the window, or release the button.
1028This variable's value may be non-integral. 1023This variable's value may be non-integral.
1029Setting this to zero causes Emacs to scroll as fast as it can." 1024Setting this to zero causes Emacs to scroll as fast as it can."
1030 :type 'number 1025 :type 'number)
1031 :group 'mouse)
1032 1026
1033(defcustom mouse-scroll-min-lines 1 1027(defcustom mouse-scroll-min-lines 1
1034 "The minimum number of lines scrolled by dragging mouse out of window. 1028 "The minimum number of lines scrolled by dragging mouse out of window.
@@ -1037,8 +1031,7 @@ scrolling repeatedly. The number of lines scrolled per repetition
1037is normally equal to the number of lines beyond the window edge that 1031is normally equal to the number of lines beyond the window edge that
1038the mouse has moved. However, it always scrolls at least the number 1032the mouse has moved. However, it always scrolls at least the number
1039of lines specified by this variable." 1033of lines specified by this variable."
1040 :type 'integer 1034 :type 'integer)
1041 :group 'mouse)
1042 1035
1043(defun mouse-scroll-subr (window jump &optional overlay start) 1036(defun mouse-scroll-subr (window jump &optional overlay start)
1044 "Scroll the window WINDOW, JUMP lines at a time, until new input arrives. 1037 "Scroll the window WINDOW, JUMP lines at a time, until new input arrives.
@@ -1945,8 +1938,7 @@ When there is no region, this function does nothing."
1945 "Number of buffers in one pane (submenu) of the buffer menu. 1938 "Number of buffers in one pane (submenu) of the buffer menu.
1946If we have lots of buffers, divide them into groups of 1939If we have lots of buffers, divide them into groups of
1947`mouse-buffer-menu-maxlen' and make a pane (or submenu) for each one." 1940`mouse-buffer-menu-maxlen' and make a pane (or submenu) for each one."
1948 :type 'integer 1941 :type 'integer)
1949 :group 'mouse)
1950 1942
1951(defcustom mouse-buffer-menu-mode-mult 4 1943(defcustom mouse-buffer-menu-mode-mult 4
1952 "Group the buffers by the major mode groups on \\[mouse-buffer-menu]? 1944 "Group the buffers by the major mode groups on \\[mouse-buffer-menu]?
@@ -1956,7 +1948,6 @@ will split the buffer menu by the major modes (see
1956Set to 1 (or even 0!) if you want to group by major mode always, and to 1948Set to 1 (or even 0!) if you want to group by major mode always, and to
1957a large number if you prefer a mixed multitude. The default is 4." 1949a large number if you prefer a mixed multitude. The default is 4."
1958 :type 'integer 1950 :type 'integer
1959 :group 'mouse
1960 :version "20.3") 1951 :version "20.3")
1961 1952
1962(defvar mouse-buffer-menu-mode-groups 1953(defvar mouse-buffer-menu-mode-groups
@@ -2354,8 +2345,7 @@ region, text is copied instead of being cut."
2354 modifier)) 2345 modifier))
2355 '(alt super hyper shift control meta)) 2346 '(alt super hyper shift control meta))
2356 (other :tag "Enable dragging the region" t)) 2347 (other :tag "Enable dragging the region" t))
2357 :version "26.1" 2348 :version "26.1")
2358 :group 'mouse)
2359 2349
2360(defcustom mouse-drag-and-drop-region-cut-when-buffers-differ nil 2350(defcustom mouse-drag-and-drop-region-cut-when-buffers-differ nil
2361 "If non-nil, cut text also when source and destination buffers differ. 2351 "If non-nil, cut text also when source and destination buffers differ.
@@ -2364,8 +2354,7 @@ the text in the source buffer alone when dropping it in a
2364different buffer. If this is non-nil, it will cut the text just 2354different buffer. If this is non-nil, it will cut the text just
2365as it does when dropping text in the source buffer." 2355as it does when dropping text in the source buffer."
2366 :type 'boolean 2356 :type 'boolean
2367 :version "26.1" 2357 :version "26.1")
2368 :group 'mouse)
2369 2358
2370(defcustom mouse-drag-and-drop-region-show-tooltip 256 2359(defcustom mouse-drag-and-drop-region-show-tooltip 256
2371 "If non-nil, text is shown by a tooltip in a graphic display. 2360 "If non-nil, text is shown by a tooltip in a graphic display.
@@ -2375,8 +2364,7 @@ tooltip. If this is an integer (as with the default value of
2375256), it will show that many characters of the dragged text in 2364256), it will show that many characters of the dragged text in
2376a tooltip." 2365a tooltip."
2377 :type 'integer 2366 :type 'integer
2378 :version "26.1" 2367 :version "26.1")
2379 :group 'mouse)
2380 2368
2381(defcustom mouse-drag-and-drop-region-show-cursor t 2369(defcustom mouse-drag-and-drop-region-show-cursor t
2382 "If non-nil, move point with mouse cursor during dragging. 2370 "If non-nil, move point with mouse cursor during dragging.
@@ -2385,16 +2373,14 @@ Otherwise, it will move point together with the mouse cursor and,
2385in addition, temporarily highlight the original region with the 2373in addition, temporarily highlight the original region with the
2386`mouse-drag-and-drop-region' face." 2374`mouse-drag-and-drop-region' face."
2387 :type 'boolean 2375 :type 'boolean
2388 :version "26.1" 2376 :version "26.1")
2389 :group 'mouse)
2390 2377
2391(defface mouse-drag-and-drop-region '((t :inherit region)) 2378(defface mouse-drag-and-drop-region '((t :inherit region))
2392 "Face to highlight original text during dragging. 2379 "Face to highlight original text during dragging.
2393This face is used by `mouse-drag-and-drop-region' to temporarily 2380This face is used by `mouse-drag-and-drop-region' to temporarily
2394highlight the original region when 2381highlight the original region when
2395`mouse-drag-and-drop-region-show-cursor' is non-nil." 2382`mouse-drag-and-drop-region-show-cursor' is non-nil."
2396 :version "26.1" 2383 :version "26.1")
2397 :group 'mouse)
2398 2384
2399(defun mouse-drag-and-drop-region (event) 2385(defun mouse-drag-and-drop-region (event)
2400 "Move text in the region to point where mouse is dragged to. 2386 "Move text in the region to point where mouse is dragged to.