bug: Each time I use the Text Properties menu I get
           this message: "<C-drag-mouse-2> is undefined".

Apparently, the mouse drag through the menu is causing a C-drag-mouse-2
event, which is then treated as pending input.

This messes up use of a menu item that I've added locally. The new menu item
reads input, and it gets confused by the extra pending input. That's how I
came across the bug and why it bothers me.

Do this, as a test:

(easy-menu-do-add-item facemenu-menu ["Test" test-fn t])

(defun test-fn ()
  (interactive)
  (message "last input event: %s, input-pending-p: %s"
           last-input-event (input-pending-p))
  (sleep-for 5))

Choose item "Test" in the facemenu-menu, via C-mouse-2.
I see this message:

  last input event: Test, input-pending-p: t

After the sleep-for, I see this in the echo area:

  <C-drag-mouse-2> is undefined

If I put a `read-char' in the test-fn, it chokes on the pending non-keyboard
input event C-drag-mouse-2, showing that this is indeed the guilty pending
event.

If I access the same Test menu item from the menu-bar (Edit > Test
Properties > Test), I see this:

  last input event: Test, input-pending-p: nil

So this is really a problem for the popup mouse menu (only).



_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to