GNU bug report logs -
#29272
26.0.90; "C-h k C-mouse-3" followed by menu selection asks for more keys
Previous Next
Full log
Message #55 received at 29272 <at> debbugs.gnu.org (full text, mbox):
> From: Noam Postavsky <npostavs <at> users.sourceforge.net>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, acm <at> muc.de, 29272 <at> debbugs.gnu.org
> Date: Wed, 29 Nov 2017 08:19:34 -0500
>
>
> The following works for me in lucid and gtk:
>
> --- c/lisp/help.el
> +++ i/lisp/help.el
> @@ -726,19 +726,19 @@ help-read-key-sequence
> (while
> (pcase (setq key (read-key-sequence "\
> Describe the following key, mouse click, or menu item: "))
> - ((and (pred vectorp) (let `(,key0 . ,_) (aref key 0))
> - (guard (symbolp key0)) (let keyname (symbol-name key0)))
> - (or
> - (and no-mouse-movement
> - (string-match "mouse-movement" keyname))
> - (and (string-match "\\(mouse\\|down\\|click\\|drag\\)"
> - keyname)
> - (progn
> - ;; Discard events (e.g. <help-echo>) which might
> - ;; spuriously trigger the `sit-for'.
> - (sleep-for 0.01)
> - (while (read-event nil nil 0.01))
> - (not (sit-for (/ double-click-time 1000.0) t))))))))
> + (`[(,key0 . ,_)]
> + (or (and no-mouse-movement (eq key0 'mouse-movement))
> + ;; Wait long enough to fully read a double click event.
> + ;; FIXME: How to handle double-click-time = t?
> + (and (numberp double-click-time)
> + (string-match "\\(mouse\\|down\\|click\\|drag\\)"
> + (symbol-name key0))
> + (progn
> + ;; Discard events (e.g. <help-echo>) which might
> + ;; spuriously trigger the `sit-for'.
> + (sleep-for 0.01)
> + (while (read-event nil nil 0.01))
> + (not (sit-for (/ double-click-time 1000.0) t))))))))
> (list
> key
> ;; If KEY is a down-event, read and include the
>
LGTM, thanks
> > BTW: Could someone please fix that
> >
> > (not (sit-for (/ double-click-time 1000.0) t))
> >
> > form so it handles at least those values of `double-click-time'
> > described in its documentation:
> >
> > 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.
> >
> > I'm not sure what `sit-for' is supposed to return in those cases.
>
> I don't know how to handle the double-click-time = t case though.
I think we should use some fixed time in that case.
This bug report was last modified 7 years and 280 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.