Variable: gpm-mouse-mode-hook
gpm-mouse-mode-hook is a customizable variable defined in
t-mouse.el.gz.
Value
nil
Documentation
Hook run after entering or leaving gpm-mouse-mode(var)/gpm-mouse-mode(fun).
No problems result if this variable is not bound.
add-hook automatically binds it. (This is true for all hook variables.)
Source Code
;; Defined in /usr/src/emacs/lisp/t-mouse.el.gz
;;;###autoload
(define-minor-mode gpm-mouse-mode
"Toggle mouse support in GNU/Linux consoles (GPM Mouse mode).
This allows the use of the mouse when operating on a GNU/Linux console,
in the same way as you can use the mouse under X11.
It relies on the `gpm' daemon being activated.
Note that when `gpm-mouse-mode' is enabled, you cannot use the
mouse to transfer text between Emacs and other programs which use
GPM. This is due to limitations in GPM and the Linux kernel."
:global t :group 'mouse :init-value t
(dolist (terminal (terminal-list))
(when (and (eq t (terminal-live-p terminal))
(not (eq gpm-mouse-mode
(terminal-parameter terminal 'gpm-mouse-active))))
;; Simulate selecting a terminal by selecting one of its frames ;-(
(with-selected-frame (car (frames-on-display-list terminal))
(gpm-mouse-tty-setup))))
(when gpm-mouse-mode
(add-hook 'tty-setup-hook #'gpm-mouse-tty-setup)))