Juri Linkov writes: >>>> FWIW, I have in my .emacs: >>>> >>>> ;; Move the mouse to the screen corner on any keypress. >>>> (when (and (display-mouse-p) (require 'avoid nil t)) >>>> ;; Move the mouse to the lower-right corner instead of default upper-right >>>> (defun mouse-avoidance-banish-destination () >>>> (cons (+ 3 (frame-width)) (- (frame-height) 1))) >>>> (mouse-avoidance-mode 'banish)) >>>> >>>> It would be better to allow users to replace such code with customization. >>> Yes, it is what my patch does: >>> Instead of your code you can just say: >>> (setq mouse-avoidance-banish-destination '(right . bottom)) >>> or of course setting that through customize interface. >> >> Also, I have added a new user variable to this patch that allow setting >> the distance from window's edge: >> >> (defcustom mouse-avoidance-banish-distance-from-edge 2 >> "Set the distance from edge of window in Mouse Avoidance mode `banish'." >> :group 'avoid >> :type 'integer) > > Thanks, but in my settings the distance is relative to frame's edge > instead of window's edge. Is it possible to express this setting > with a user variable? Here the improved version of the patch: