• Stefan Monnier's avatar
    * lisp/help.el (help--read-key-sequence): Handle `switch-frame' events · 65563480
    Stefan Monnier authored
    If you do `C-h k ... mouse-1 in other frame` (at least if you have a focus
    that follows the mouse), then additionally to the down-mouse-1 and mouse-1
    events, a `switch-frame` event (and `select-window` event as well sometimes)
    is generated.  When `read-key-sequence` is called with nil for
    `can-return-switch-frame`, this event is not returned but kept for later,
    which causes a subsequent `sit-for` to return nil immediately.
    This interfered without our "wait for double-click" which in turn prevented
    us from stopping after the mouse-1 click, getting stuck waiting for something
    else instead.
    
    (help--read-key-sequence): Pass a non-nil `can-return-switch-frame`, so the
    subsequent `sit-for` returns more trustworthy information.
    65563480
help.el 59.4 KB