[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New Context Menu and mouse-1
From: |
Stefan Monnier |
Subject: |
Re: New Context Menu and mouse-1 |
Date: |
Mon, 30 Aug 2021 08:54:30 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Juri Linkov [2021-08-30 10:22:01] wrote:
>>> BTW, maybe another way to look at the problem is to say that
>>> invoking the context-menu should not exit the transient map (but this
>>> may come with its own set of problems, of course).
>>
>> + (when (memq (car-safe last-input-event) '(mouse-1 drag-mouse-1))
>> + (deactivate-mark)
>> + (pop-mark))))))
>
> Or rather
>
> + (unless (and context-menu-mode
> + (eq (car-safe (aref (this-command-keys-vector) 0))
> + 'down-mouse-3))
> + (deactivate-mark)
> + (pop-mark))))))
This looks "honest and safe". If you can add a comment explaining why
we have this ad-hoc hack there, then I think it's quite acceptable
(given that we're unable to figure out what is The Right Way).
Stefan
- Re: New Context Menu, (continued)
Re: New Context Menu and mouse-1, Juri Linkov, 2021/08/27
- Re: New Context Menu and mouse-1, Eli Zaretskii, 2021/08/27
- Re: New Context Menu and mouse-1, Juri Linkov, 2021/08/27
- Re: New Context Menu and mouse-1, Stefan Monnier, 2021/08/27
- Re: New Context Menu and mouse-1, Juri Linkov, 2021/08/28
- Re: New Context Menu and mouse-1, Juri Linkov, 2021/08/29
- Re: New Context Menu and mouse-1, Juri Linkov, 2021/08/30
- Re: New Context Menu and mouse-1,
Stefan Monnier <=