summaryrefslogtreecommitdiff
path: root/lisp/t-mouse.el
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2007-05-04 02:26:14 +0000
committerNick Roberts <nickrob@snap.net.nz>2007-05-04 02:26:14 +0000
commit1a12af30ce0b522aa8c7efb6143b5692007d38b8 (patch)
tree2e7596485b33b13753164b1221678ac9bc5eeefb /lisp/t-mouse.el
parent12bf4a28f2912ea4479ea6dc5d65d41a148bc4d3 (diff)
downloademacs-1a12af30ce0b522aa8c7efb6143b5692007d38b8.tar.gz
(t-mouse-mode): Do nothing on a graphical display
when disabling t-mouse-mode.
Diffstat (limited to 'lisp/t-mouse.el')
-rw-r--r--lisp/t-mouse.el48
1 files changed, 24 insertions, 24 deletions
diff --git a/lisp/t-mouse.el b/lisp/t-mouse.el
index 15521decd90..ba774e68443 100644
--- a/lisp/t-mouse.el
+++ b/lisp/t-mouse.el
@@ -275,32 +275,32 @@ With prefix arg, turn t-mouse mode on iff arg is positive.
Turn it on to use Emacs mouse commands, and off to use t-mouse commands."
nil " Mouse" nil :global t
- (if t-mouse-mode
- ;; Turn it on
- (unless window-system
- ;; Starts getting a stream of mouse events from an asynchronous process.
- ;; Only works if Emacs is running on a virtual terminal without a window system.
+ (unless window-system
+ (if t-mouse-mode
+ ;; Turn it on. Starts getting a stream of mouse events from an
+ ;; asynchronous process. Only works if Emacs is running on a virtual
+ ;; terminal without a window system.
(progn
- (setq mouse-position-function #'t-mouse-mouse-position-function)
- (let ((tty (t-mouse-tty))
- (process-connection-type t))
- (if (not (stringp tty))
- (error "Cannot find a virtual terminal"))
- (setq t-mouse-process
- (start-process "t-mouse" nil
- "mev" "-i" "-E" "-C" tty
- (if t-mouse-swap-alt-keys
- "-M-leftAlt" "-M-rightAlt")
- "-e-move"
- "-dall" "-d-hard"
- "-f")))
- (setq t-mouse-filter-accumulator "")
- (set-process-filter t-mouse-process 't-mouse-process-filter)
- (set-process-query-on-exit-flag t-mouse-process nil)))
+ (setq mouse-position-function #'t-mouse-mouse-position-function)
+ (let ((tty (t-mouse-tty))
+ (process-connection-type t))
+ (if (not (stringp tty))
+ (error "Cannot find a virtual terminal"))
+ (setq t-mouse-process
+ (start-process "t-mouse" nil
+ "mev" "-i" "-E" "-C" tty
+ (if t-mouse-swap-alt-keys
+ "-M-leftAlt" "-M-rightAlt")
+ "-e-move"
+ "-dall" "-d-hard"
+ "-f")))
+ (setq t-mouse-filter-accumulator "")
+ (set-process-filter t-mouse-process 't-mouse-process-filter)
+ (set-process-query-on-exit-flag t-mouse-process nil))
;; Turn it off
- (setq mouse-position-function nil)
- (delete-process t-mouse-process)
- (setq t-mouse-process nil)))
+ (setq mouse-position-function nil)
+ (delete-process t-mouse-process)
+ (setq t-mouse-process nil))))
(provide 't-mouse)