GNU bug report logs -
#47060
mouse-1-click-follows-link double broken by 3d5e31eceb9dc1fb62b2b27bcab549df3bd04ce9
Previous Next
Reported by: Eyal Soha <eyalsoha <at> gmail.com>
Date: Wed, 10 Mar 2021 22:53:02 UTC
Severity: normal
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Setting the variable mouse-1-click-follows-link to 'double was broken by
> the commit 3d5e31eceb9dc1fb62b2b27bcab549df3bd04ce9 .
Indeed! And since this code can be sometimes tricky to debug and tune,
your report got me scared that I was going to have to rethink the way it
works, but ... it was a silly mistake: I called `event-convert-list`
with a list whose last element was not always a "basic" event,
so we ended up comparing `down-double-mouse-1` and `double-down-mouse-1`
and deciding these are different events.
The patch below should fix it.
I think this patch should go to `emacs-27`. Eli any objection?
Stefan
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 8732fb8086..f4979e37b0 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -119,7 +119,9 @@ mouse--click-1-maybe-follows-link
(time-since (cdr mouse--last-down))
(/ (abs mouse-1-click-follows-link) 1000.0))))))
(eq (car mouse--last-down)
- (event-convert-list (list 'down (car-safe last-input-event))))
+ (event-convert-list
+ `(down ,@(event-modifiers last-input-event)
+ ,(event-basic-type last-input-event))))
(let* ((action (mouse-on-link-p (event-start last-input-event))))
(when (and action
(or mouse-1-click-in-non-selected-windows
This bug report was last modified 4 years and 67 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.