Variable: mouse-position-function

mouse-position-function is a variable defined in frame.c.

Value

nil

Documentation

If non-nil, function to transform normal value of mouse-position.

mouse-position and mouse-pixel-position call this function, passing their usual return value as argument, and return whatever this function returns. This abnormal hook exists for the benefit of packages like xt-mouse.el which need to do mouse handling at the Lisp level.

Probably introduced at or before Emacs version 21.1.

Source Code

// Defined in /usr/src/emacs/src/frame.c
  DEFVAR_LISP ("mouse-position-function", Vmouse_position_function,
	       doc: /* If non-nil, function to transform normal value of `mouse-position'.
`mouse-position' and `mouse-pixel-position' call this function, passing their
usual return value as argument, and return whatever this function returns.
This abnormal hook exists for the benefit of packages like `xt-mouse.el'
which need to do mouse handling at the Lisp level.  */);