unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* The surprising value of mouse-1 modifiers
@ 2008-01-18  0:44 Lennart Borgman (gmail)
  2008-01-18  1:49 ` Glenn Morris
  2008-01-19  3:32 ` Richard Stallman
  0 siblings, 2 replies; 4+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-18  0:44 UTC (permalink / raw)
  To: Emacs Devel

Why does

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

gives such a strange value while

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

is rather reasonable?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: The surprising value of mouse-1 modifiers
  2008-01-18  0:44 The surprising value of mouse-1 modifiers Lennart Borgman (gmail)
@ 2008-01-18  1:49 ` Glenn Morris
  2008-01-18 20:56   ` Lennart Borgman (gmail)
  2008-01-19  3:32 ` Richard Stallman
  1 sibling, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2008-01-18  1:49 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: Emacs developers


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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: The surprising value of mouse-1 modifiers
  2008-01-18  1:49 ` Glenn Morris
@ 2008-01-18 20:56   ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 4+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-18 20:56 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Emacs developers

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: The surprising value of mouse-1 modifiers
  2008-01-18  0:44 The surprising value of mouse-1 modifiers Lennart Borgman (gmail)
  2008-01-18  1:49 ` Glenn Morris
@ 2008-01-19  3:32 ` Richard Stallman
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2008-01-19  3:32 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-devel

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

    gives such a strange value

For me it returns (click).  What is the value you get?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-19  3:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-18  0:44 The surprising value of mouse-1 modifiers Lennart Borgman (gmail)
2008-01-18  1:49 ` Glenn Morris
2008-01-18 20:56   ` Lennart Borgman (gmail)
2008-01-19  3:32 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).