[Top][All Lists]

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

Re: msb.el is broken

From: Chong Yidong
Subject: Re: msb.el is broken
Date: Sun, 28 May 2006 10:21:25 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Juri Linkov <address@hidden> writes:

> The second problem is that I can't use <C-down-mouse-1> to open a menu
> like I can do for the standard plain buffer menu without loading msb.el.
> The change from <C-down-mouse-1> to <C-mouse-1> is caused by your patch:
> 2006-05-02  Chong Yidong  <address@hidden>
>       * msb.el (msb): If EVENT is a down event, read and discard the up event.
> After reverting it, I can click <C-down-mouse-1> to open a msb buffer menu
> without releasing the mouse button.

That patch was checked in due to this bug report from last month:

  Enable MSB mode with `M-x msb-mode RET'.  Do `C-Down-Mouse-1' to bring
  up the menu, release the button, move through the menus to select a
  buffer, and then click and release.  An error is displayed in the echo
  area, usually ``<C-mouse-1> is undefined''.

This is related to a hack in msb.el that tries to make the menu stay
up after the mouse button is released:

    ;; This `sit-for' magically makes the menu stay up if the mouse
    ;; button is released within 0.1 second.
    (sit-for 0 100)
    ;; Popup the menu
    (setq choice (x-popup-menu position msb--last-buffer-menu))

The trouble is that after selecting something from the buffer menu,
the up event will be triggered and it is bound to nothing, so the
error message is displayed.  The purpose of my patch is to eat the up

We can't have our cake and eat it too: either (i) the mouse buffer
stays up after button-up, and a second click selects (which is the
correct behavior in GTK), or (ii) the mouse buffer disappears after
button-up, and the user drags the mouse to select (which is the
"traditional" behavior on X toolkits).

(Mouse dragging is linked to RSI, by the way ;-)

reply via email to

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