comparison lisp/xt-mouse.el @ 90143:146c086df160

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-37 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 241-257) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 59-65) - Update from CVS - Merge from emacs--cvs-trunk--0 - (mm-string-to-multibyte): Use Gnus trunk definition.
author Miles Bader <miles@gnu.org>
date Thu, 14 Apr 2005 05:03:52 +0000
parents 02f1dbc4a199 a576ac1919b9
children e1fbb019c538
comparison
equal deleted inserted replaced
90142:627771f44771 90143:146c086df160
154 (define-minor-mode xterm-mouse-mode 154 (define-minor-mode xterm-mouse-mode
155 "Toggle XTerm mouse mode. 155 "Toggle XTerm mouse mode.
156 With prefix arg, turn XTerm mouse mode on iff arg is positive. 156 With prefix arg, turn XTerm mouse mode on iff arg is positive.
157 157
158 Turn it on to use Emacs mouse commands, and off to use xterm mouse commands. 158 Turn it on to use Emacs mouse commands, and off to use xterm mouse commands.
159 This works in terminal emulators compatible with xterm. Only single clicks 159 This works in terminal emulators compatible with xterm. It only
160 are supported. When turned on, the normal xterm mouse functionality is still 160 works for simple uses of the mouse. Basically, only non-modified
161 available by holding down the SHIFT key while pressing the mouse button." 161 single clicks are supported. When turned on, the normal xterm
162 nil " Mouse" nil :global t :group 'mouse 162 mouse functionality for such clicks is still available by holding
163 down the SHIFT key while pressing the mouse button."
164 :global t :group 'mouse
165 ;; If you change the code below, you also need to change the
166 ;; corresponding code in startup.el.
167 :init-value (unless (or noninteractive
168 window-system)
169 (let ((term (getenv "TERM")))
170 (and term
171 (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)"
172 term)
173 t)))
163 (if xterm-mouse-mode 174 (if xterm-mouse-mode
164 ;; Turn it on 175 ;; Turn it on
165 (unless window-system 176 (unless window-system
166 (setq mouse-position-function #'xterm-mouse-position-function) 177 (setq mouse-position-function #'xterm-mouse-position-function)
167 (turn-on-xterm-mouse-tracking)) 178 (turn-on-xterm-mouse-tracking))