49 |
:version "22.1" |
:version "22.1" |
50 |
:group 'mouse) |
:group 'mouse) |
51 |
|
|
52 |
(defcustom mouse-1-click-follows-link 350 |
(defcustom mouse-1-click-follows-link 450 |
53 |
"Non-nil means that clicking Mouse-1 on a link follows the link. |
"Non-nil means that clicking Mouse-1 on a link follows the link. |
54 |
|
|
55 |
With the default setting, an ordinary Mouse-1 click on a link |
With the default setting, an ordinary Mouse-1 click on a link |
837 |
(funcall action pos)) |
(funcall action pos)) |
838 |
(t action))))))) |
(t action))))))) |
839 |
|
|
840 |
|
(defun mouse-fixup-help-message (msg) |
841 |
|
"Fix help message MSG for `mouse-1-click-follows-link'." |
842 |
|
(let (mp pos) |
843 |
|
(if (and mouse-1-click-follows-link |
844 |
|
(stringp msg) |
845 |
|
(save-match-data |
846 |
|
(string-match "^mouse-2" msg)) |
847 |
|
(setq mp (mouse-pixel-position)) |
848 |
|
(consp (setq pos (cdr mp))) |
849 |
|
(car pos) (>= (car pos) 0) |
850 |
|
(cdr pos) (>= (cdr pos) 0) |
851 |
|
(setq pos (posn-at-x-y (car pos) (cdr pos) (car mp))) |
852 |
|
(windowp (posn-window pos))) |
853 |
|
(with-current-buffer (window-buffer (posn-window pos)) |
854 |
|
(if (mouse-on-link-p pos) |
855 |
|
(setq msg (concat |
856 |
|
(cond |
857 |
|
((eq mouse-1-click-follows-link 'double) "double-") |
858 |
|
((and (integerp mouse-1-click-follows-link) |
859 |
|
(< mouse-1-click-follows-link 0)) "Long ") |
860 |
|
(t "")) |
861 |
|
"mouse-1" (substring msg 7))))))) |
862 |
|
msg) |
863 |
|
|
864 |
(defun mouse-drag-region-1 (start-event) |
(defun mouse-drag-region-1 (start-event) |
865 |
(mouse-minibuffer-check start-event) |
(mouse-minibuffer-check start-event) |
909 |
(track-mouse |
(track-mouse |
910 |
(while (progn |
(while (progn |
911 |
(setq event (read-event)) |
(setq event (read-event)) |
912 |
|
(setq mve (cons event (and (boundp 'mve) mve))) |
913 |
(or (mouse-movement-p event) |
(or (mouse-movement-p event) |
914 |
(memq (car-safe event) '(switch-frame select-window)))) |
(memq (car-safe event) '(switch-frame select-window)))) |
915 |
(if (memq (car-safe event) '(switch-frame select-window)) |
(if (memq (car-safe event) '(switch-frame select-window)) |
1021 |
(= (window-start start-window) |
(= (window-start start-window) |
1022 |
start-window-start))) |
start-window-start))) |
1023 |
(if (and on-link |
(if (and on-link |
1024 |
(not end-point) |
(or (not end-point) (= end-point start-point)) |
1025 |
(consp event) |
(consp event) |
1026 |
(or remap-double-click |
(or remap-double-click |
1027 |
(and |
(and |