emacs-devel
[Top][All Lists]
Advanced

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

RE: Q on Text Properties popup menu - shouldn't it usethepointerposition


From: Drew Adams
Subject: RE: Q on Text Properties popup menu - shouldn't it usethepointerposition, not the cursor position?
Date: Sat, 25 Jun 2005 18:26:46 -0700

           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).





reply via email to

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