bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#38013: [PATCH] Rectangular region selection with mouse


From: Eli Zaretskii
Subject: bug#38013: [PATCH] Rectangular region selection with mouse
Date: Sat, 23 Nov 2019 16:53:13 +0200

> From: Mattias Engdegård <mattiase@acm.org>
> Date: Sat, 23 Nov 2019 13:46:08 +0100
> Cc: rudalics@gmx.at, 38013@debbugs.gnu.org
> 
> > I think this variable's name should start with "mouse-".  Like
> > mouse-fine-grained-movement or something.
> 
> True, but since the variable pertains to the 'mouse-movement' event in 
> particular and not to moving the mouse about in general, it is also useful to 
> have the name reflect that relation.
> 'mouse-movement-fine-grained' is possible but a bit awkward. What about 
> 'mouse-fine-grained-tracking'?

Fine with me.

> The code follows the pattern of other functions in the same file in that it 
> trusts the exit function of the transient map to be executed eventually, and 
> the first thing done in that exit function is to reset the variables.
> 
> All these functions have a small hole between setting the variables and the 
> successful return of set-transient-map, during which an error will not result 
> in the variables being reset. We could wrap the set-transient-map calls in 
> condition-case everywhere, if we think that this would increase robustness. 
> Basically,
> 
> (condition-case err
>     (set-transient-map ...)
>   (error (setq fine-grained-mouse-movement nil)
>          (setq track-mouse nil)
>          (signal (car err) (cdr err))))

I think this would be better.  IME, such small windows eventually
cause strange and hard to debug bugs, so any measures to make the
window smaller or eliminate it are welcome.

Thanks.





reply via email to

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