emacs-devel
[Top][All Lists]
Advanced

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

Re: The surprising value of mouse-1 modifiers


From: Lennart Borgman (gmail)
Subject: Re: The surprising value of mouse-1 modifiers
Date: Fri, 18 Jan 2008 21:56:15 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Glenn Morris wrote:
Lennart Borgman wrote (on Fri, 18 Jan 2008 at 01:44 +0100):

Why does

   M-: (event-modifiers (list 'mouse-1))

gives such a strange value while

   M-: (event-modifiers (list 'M-mouse-1))

is rather reasonable?

Give a complete description, rather than leaving us to guess what you
class as "surprising" and "strange".

(click) and (meta click) seem equally reasonable to me.

This is a bit more problematic than my other problem reports yesterday (which where just plain mistakes by me I hope). I am not sure what is going on but I got for example

(event-modifiers '(mouse-1)) => (click mouse-1 mouse-1 mouse-1 mouse-1 mouse-1)

or just (click mouse-1) sometimes. I tried over and over again and got the first version so I assumed that was what everyone else saw too ;-)

I took a look at the C sources and to my surprise I saw that event-modifiers did a bit more than looked at the symbol parameter.

For the moment I am doing this before calling event-modifiers:

 (put k 'event-symbol-element-mask nil)

where k could be for example 'mouse-1.

It seems to work (as a workaround), but something is wrong I believe. Unfortunately I can not give a simple reciepe to reproduce this, but the ingredients might be:

  - using read-event to read mouse events
- do not call read-event until there is a timeout (using double-click-time)
  - use edebug

What makes it even more difficult is that I have done some patches to w32 C sources where I am not sure that the latest merge did exactly what I wanted. Most of those patches are straight forward but some of them are in the difficult code for handling w32 messages.




reply via email to

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