unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 95717db1e8: Fix mouse pointer avoidance in some configurations
       [not found] ` <20220511080205.93362C01683@vcs2.savannah.gnu.org>
@ 2022-05-12 11:51   ` Arash Esbati
  2022-05-12 12:27     ` Po Lu
  0 siblings, 1 reply; 6+ messages in thread
From: Arash Esbati @ 2022-05-12 11:51 UTC (permalink / raw)
  To: emacs-devel; +Cc: Po Lu

Po Lu via Mailing list for Emacs changes <emacs-diffs@gnu.org> writes:

> diff --git a/lisp/avoid.el b/lisp/avoid.el
> index b53d84d2e8..c97e51a6f7 100644
> --- a/lisp/avoid.el
> +++ b/lisp/avoid.el
> @@ -300,12 +300,14 @@ has an integer value is a valid cursor shape.  You might want to
>  redefine this function to suit your own tastes."
>    (if (null mouse-avoidance-pointer-shapes)
>        (progn
> -	(setq mouse-avoidance-pointer-shapes
> -	      (mapcar (lambda (x) (symbol-value (intern x)))
> -		      (all-completions "x-pointer-" obarray
> -				       (lambda (x)
> -					  (and (boundp x)
> -                                               (integerp (symbol-value x)))))))))
> +	(dolist (i (all-completions "x-pointer-" obarray
> +				    (lambda (x)
> +				      (and (boundp x)
> +                                           (integerp (symbol-value x))))))
> +          (ignore-errors
> +            (let ((value (symbol-value (intern i))))
> +              (when (< value x-pointer-invisible)
> +                (push value mouse-avoidance-pointer-shapes)))))))
>    (seq-random-elt mouse-avoidance-pointer-shapes))

I think this change leads to:

  In mouse-avoidance-random-shape:
  avoid.el:309:30: Warning: reference to free variable `x-pointer-invisible'

when building Emacs (aeefa3a732, on Win10).

Best, Arash



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

* Re: master 95717db1e8: Fix mouse pointer avoidance in some configurations
  2022-05-12 11:51   ` master 95717db1e8: Fix mouse pointer avoidance in some configurations Arash Esbati
@ 2022-05-12 12:27     ` Po Lu
  2022-05-12 12:38       ` Arash Esbati
  0 siblings, 1 reply; 6+ messages in thread
From: Po Lu @ 2022-05-12 12:27 UTC (permalink / raw)
  To: Arash Esbati; +Cc: emacs-devel

Arash Esbati <arash@gnu.org> writes:

> I think this change leads to:
>
>   In mouse-avoidance-random-shape:
>   avoid.el:309:30: Warning: reference to free variable `x-pointer-invisible'
>
> when building Emacs (aeefa3a732, on Win10).
>
> Best, Arash

Hmm, does adding (defvar x-pointer-invisible) to the top of that file
fix the problem?



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

* Re: master 95717db1e8: Fix mouse pointer avoidance in some configurations
  2022-05-12 12:27     ` Po Lu
@ 2022-05-12 12:38       ` Arash Esbati
  2022-05-19 14:09         ` Arash Esbati
  0 siblings, 1 reply; 6+ messages in thread
From: Arash Esbati @ 2022-05-12 12:38 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

Po Lu <luangruo@yahoo.com> writes:

> Hmm, does adding (defvar x-pointer-invisible) to the top of that file
> fix the problem?

Yes, it does.

Best, Arash



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

* Re: master 95717db1e8: Fix mouse pointer avoidance in some configurations
  2022-05-12 12:38       ` Arash Esbati
@ 2022-05-19 14:09         ` Arash Esbati
  2022-05-27  7:56           ` Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Arash Esbati @ 2022-05-19 14:09 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

Arash Esbati <arash@gnu.org> writes:

> Po Lu <luangruo@yahoo.com> writes:
>
>> Hmm, does adding (defvar x-pointer-invisible) to the top of that file
>> fix the problem?
>
> Yes, it does.

To avoid confusion: Was the idea that I install the fix above?  I can do
it, just let me know.

Best, Arash



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

* Re: master 95717db1e8: Fix mouse pointer avoidance in some configurations
  2022-05-19 14:09         ` Arash Esbati
@ 2022-05-27  7:56           ` Stefan Kangas
  2022-05-27  8:04             ` Po Lu
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Kangas @ 2022-05-27  7:56 UTC (permalink / raw)
  To: Arash Esbati; +Cc: Po Lu, Emacs developers

Arash Esbati <arash@gnu.org> writes:

> Arash Esbati <arash@gnu.org> writes:
>
> > Po Lu <luangruo@yahoo.com> writes:
> >
> >> Hmm, does adding (defvar x-pointer-invisible) to the top of that file
> >> fix the problem?
> >
> > Yes, it does.
>
> To avoid confusion: Was the idea that I install the fix above?  I can do
> it, just let me know.

I've installed the above fix to silence the warning.

It's not immediately clear to me if this means that
mouse-avoidance-mode will still work on macOS and Windows.  Maybe
someone could take a look; I don't use that mode myself but it seems
okay to me after some cursory testing.



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

* Re: master 95717db1e8: Fix mouse pointer avoidance in some configurations
  2022-05-27  7:56           ` Stefan Kangas
@ 2022-05-27  8:04             ` Po Lu
  0 siblings, 0 replies; 6+ messages in thread
From: Po Lu @ 2022-05-27  8:04 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Arash Esbati, Emacs developers

Stefan Kangas <stefan@marxist.se> writes:

> It's not immediately clear to me if this means that
> mouse-avoidance-mode will still work on macOS and Windows.  Maybe
> someone could take a look; I don't use that mode myself but it seems
> okay to me after some cursory testing.

All modes except `proteus' should work fine on Macs and MS Windows,
but that specific mode only works on X and Haiku.

The feature doesn't work on PGTK at all.



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

end of thread, other threads:[~2022-05-27  8:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <165225612522.6543.149839793356593222@vcs2.savannah.gnu.org>
     [not found] ` <20220511080205.93362C01683@vcs2.savannah.gnu.org>
2022-05-12 11:51   ` master 95717db1e8: Fix mouse pointer avoidance in some configurations Arash Esbati
2022-05-12 12:27     ` Po Lu
2022-05-12 12:38       ` Arash Esbati
2022-05-19 14:09         ` Arash Esbati
2022-05-27  7:56           ` Stefan Kangas
2022-05-27  8:04             ` Po Lu

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).