Function: gpm-mouse-enable

gpm-mouse-enable is a byte-compiled function defined in t-mouse.el.gz.

Signature

(gpm-mouse-enable)

Documentation

Try to enable gpm mouse support on the current terminal.

Source Code

;; Defined in /usr/src/emacs/lisp/t-mouse.el.gz
(defun gpm-mouse-enable ()
  "Try to enable gpm mouse support on the current terminal."
  (let ((activated nil))
    (unwind-protect
        (progn
          (unless (fboundp 'gpm-mouse-start)
            (error "Emacs must be built with Gpm to use this mode"))
          (when gpm-mouse-mode
            (gpm-mouse-start)
            (set-terminal-parameter nil 'gpm-mouse-active t)
            (setq activated t)))
      ;; If something failed to turn it on, try to turn it off as well,
      ;; just in case.
      (unless activated (gpm-mouse-disable)))))