I'm using Spacemacs on MS Windows (msys2 build) and when a tooltip pops up Emacs seems to move my mouse pointer out of the way. How can I prevent this automatic movement?

1 Answer 1


I do not use Spacemacs, but this could be caused by mouse-avoidance-mode. It normally moves the mouse when the cursor is nearby. So it may also apply to tooltips, I am not sure.

You can check if it is enabled with C-h v mouse-avoidance-mode. If it is not nil, you can disable it with (mouse-avoidance-mode -1).

There are also several other options how the mouse is moved, see the manual. I used to set it to 'exile, which makes the cursor automatically return.

  • Sadly it's already nil. Nov 11, 2019 at 2:44
  • The low-level function to move the mouse seems to be set-mouse-position. You can try to enable the debugger when this function is invoked and see what other function triggered it. To do so evaluate (debug-on-entry 'set-mouse-position). This will only work if whatever moves your mouse, uses this function, but that seems fairly likely. To disable the debugger again use (cancel-debug-on-entry 'set-mouse-position).
    – fpiper
    Nov 11, 2019 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.