bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23419: 25.0.93; double-click-time


From: Stefan Kangas
Subject: bug#23419: 25.0.93; double-click-time
Date: Fri, 14 Aug 2020 20:49:18 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

tags 23419 + patch
thanks

martin rudalics <rudalics@gmx.at> writes:

> The documentation of ‘double-click-time’ is as:
>
>   Maximum time between mouse clicks to make a double-click.
>   Measured in milliseconds.  The value nil means disable double-click
>   recognition; t means double-clicks have no time limit and are detected
>   by position only.
>
> However, most uses of ‘double-click-time’ in the lisp directory silently
> assume that the value is a number which typically fails in ‘sit-for’s
> like, for example, in help.el's
>
>   (not (sit-for (/ double-click-time 1000.0) t))
>
> when ‘double-click-time’ is either t or nil.
>
> Could someone out there who understands the semantics of these
> ‘sit-for’s please fix them.  I can eventually do that myself but these
> semantics are yet pretty unclear to me.

I can confirm this.  To reproduce the issue in help.el, use:

0. emacs -Q
1. (setq double-click-time nil)
2. C-h k mouse-1

In the attached patch I add a new function `mouse-double-click-time'
which always returns a number.  This seems better than adding
specialized logic everywhere to handle the various cases.

Any comments?

Best regards,
Stefan Kangas

Attachment: 0001-Fix-handling-double-click-time-nil-or-t-Bug-23419.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]