diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2020-05-17 14:59:10 +0200 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2020-05-17 15:49:25 +0200 |
commit | a8f24a89d73a31d1bbea10b27f61c399637f9cb6 (patch) | |
tree | 8d5effb10061513f546cf94477810aaf19faec0e /lisp | |
parent | 313955110b242cd18fc19bd168032d3ddf39fe94 (diff) | |
download | emacs-a8f24a89d73a31d1bbea10b27f61c399637f9cb6.tar.gz emacs-a8f24a89d73a31d1bbea10b27f61c399637f9cb6.tar.bz2 emacs-a8f24a89d73a31d1bbea10b27f61c399637f9cb6.zip |
Fix minor issues with mouse-drag-and-drop-region-show-tooltip
* lisp/mouse.el (mouse-drag-and-drop-region-show-tooltip): Fix
defcustom type to allow all valid values. Suggested by David
Ponce. (Bug#41351)
(mouse-drag-and-drop-region): Fix bug where setting
`drag-and-drop-region-show-tooltip' to 0 would still show a
tooltip.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mouse.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 795b4da19e1..f045e5bdce2 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -2575,9 +2575,12 @@ as it does when dropping text in the source buffer." If this option is nil, `mouse-drag-and-drop-region' does not show tooltips. If this is t, it shows the entire text dragged in a tooltip. If this is an integer (as with the default value of -256), it will show that many characters of the dragged text in -a tooltip." - :type 'integer +256), it will show up to that many characters of the dragged text +in a tooltip." + :type '(choice + (const :tag "Do not show tooltips" nil) + (const :tag "Show all text" t) + (integer :tag "Show characters (max)" 256)) :version "26.1") (defcustom mouse-drag-and-drop-region-show-cursor t @@ -2611,6 +2614,7 @@ is copied instead of being cut." (let* ((mouse-button (event-basic-type last-input-event)) (mouse-drag-and-drop-region-show-tooltip (when (and mouse-drag-and-drop-region-show-tooltip + (> mouse-drag-and-drop-region-show-tooltip 0) (display-multi-frame-p) (require 'tooltip)) mouse-drag-and-drop-region-show-tooltip)) |