mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-01 09:51:22 -08:00
(mouse-1-click-follows-link): Increase to 450 ms.
(mouse-fixup-help-message): New defun called by show_help_echo to fixup mouse-2 prefix in help messages when applicable.
This commit is contained in:
parent
34514f4824
commit
5dbda51848
1 changed files with 26 additions and 2 deletions
|
|
@ -49,7 +49,7 @@
|
||||||
:version "22.1"
|
:version "22.1"
|
||||||
:group 'mouse)
|
:group 'mouse)
|
||||||
|
|
||||||
(defcustom mouse-1-click-follows-link 350
|
(defcustom mouse-1-click-follows-link 450
|
||||||
"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.
|
||||||
|
|
||||||
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,6 +837,29 @@ at the same position."
|
||||||
(funcall action pos))
|
(funcall action pos))
|
||||||
(t action)))))))
|
(t action)))))))
|
||||||
|
|
||||||
|
(defun mouse-fixup-help-message (msg)
|
||||||
|
"Fix help message MSG for `mouse-1-click-follows-link'."
|
||||||
|
(let (mp pos)
|
||||||
|
(if (and mouse-1-click-follows-link
|
||||||
|
(stringp msg)
|
||||||
|
(save-match-data
|
||||||
|
(string-match "^mouse-2" msg))
|
||||||
|
(setq mp (mouse-pixel-position))
|
||||||
|
(consp (setq pos (cdr mp)))
|
||||||
|
(car pos) (>= (car pos) 0)
|
||||||
|
(cdr pos) (>= (cdr pos) 0)
|
||||||
|
(setq pos (posn-at-x-y (car pos) (cdr pos) (car mp)))
|
||||||
|
(windowp (posn-window pos)))
|
||||||
|
(with-current-buffer (window-buffer (posn-window pos))
|
||||||
|
(if (mouse-on-link-p pos)
|
||||||
|
(setq msg (concat
|
||||||
|
(cond
|
||||||
|
((eq mouse-1-click-follows-link 'double) "double-")
|
||||||
|
((and (integerp mouse-1-click-follows-link)
|
||||||
|
(< mouse-1-click-follows-link 0)) "Long ")
|
||||||
|
(t ""))
|
||||||
|
"mouse-1" (substring msg 7)))))))
|
||||||
|
msg)
|
||||||
|
|
||||||
(defun mouse-drag-region-1 (start-event)
|
(defun mouse-drag-region-1 (start-event)
|
||||||
(mouse-minibuffer-check start-event)
|
(mouse-minibuffer-check start-event)
|
||||||
|
|
@ -886,6 +909,7 @@ at the same position."
|
||||||
(track-mouse
|
(track-mouse
|
||||||
(while (progn
|
(while (progn
|
||||||
(setq event (read-event))
|
(setq event (read-event))
|
||||||
|
(setq mve (cons event (and (boundp 'mve) mve)))
|
||||||
(or (mouse-movement-p event)
|
(or (mouse-movement-p event)
|
||||||
(memq (car-safe event) '(switch-frame select-window))))
|
(memq (car-safe event) '(switch-frame select-window))))
|
||||||
(if (memq (car-safe event) '(switch-frame select-window))
|
(if (memq (car-safe event) '(switch-frame select-window))
|
||||||
|
|
@ -997,7 +1021,7 @@ at the same position."
|
||||||
(= (window-start start-window)
|
(= (window-start start-window)
|
||||||
start-window-start)))
|
start-window-start)))
|
||||||
(if (and on-link
|
(if (and on-link
|
||||||
(not end-point)
|
(or (not end-point) (= end-point start-point))
|
||||||
(consp event)
|
(consp event)
|
||||||
(or remap-double-click
|
(or remap-double-click
|
||||||
(and
|
(and
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue