[Top][All Lists]

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

Re: Context menus and mouse-3

From: Juri Linkov
Subject: Re: Context menus and mouse-3
Date: Fri, 16 Jul 2021 21:50:39 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> I don't know what I did wrong but this does nothing:
>>   (global-set-key [down-mouse-3] [context-menu])
> This is a keyboard macro and the "extra info" (the `posn`) associated
> with the `down-mouse-3` will not be passed on to the `context-menu`
> event, so that's probably why it "does nothing".
> Maybe something like
>     (global-set-key [down-mouse-3]
>       (lambda (event)
>         (interactive "e")
>         (execute-kbd-macro (vector `(context-menu . ,(cdr event))))))
> ??

Nope, this doesn't fly.  Then for debugging tried:

  (global-set-key [context-menu]
    (lambda (&rest args) (interactive) (message "=> %S" args)))

  (global-set-key [down-mouse-3]
        (lambda (event)
          (interactive "e")
          (execute-kbd-macro (vector `(context-menu . ,(cdr event))))))

but it prints => nil

reply via email to

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