Mercurial > emacs
comparison lisp/xt-mouse.el @ 61513:a53097b105b0
(xterm-mouse-mode): Provide correct standard value for Custom. No
longer show "Mouse" in mode line when enabled. Doc fix.
author | Luc Teirlinck <teirllm@auburn.edu> |
---|---|
date | Tue, 12 Apr 2005 23:05:22 +0000 |
parents | 321e7372c394 |
children | a576ac1919b9 |
comparison
equal
deleted
inserted
replaced
61512:46263849dcce | 61513:a53097b105b0 |
---|---|
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 ;; Do not change the :init-value below, without corresponding | |
166 ;; changes in the related code in startup.el. | |
167 :init-value (unless (or noninteractive | |
168 window-system | |
169 (null term-file-prefix)) | |
170 (let ((term (getenv "TERM")) | |
171 hyphend) | |
172 (while | |
173 (and term | |
174 (not (load (concat term-file-prefix term) t t))) | |
175 ;; Strip off last hyphen and what follows, then | |
176 ;; try again | |
177 (setq term | |
178 (if (setq hyphend | |
179 (string-match "[-_][^-_]+$" term)) | |
180 (substring term 0 hyphend) | |
181 nil))) | |
182 (and term | |
183 (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" | |
184 term) | |
185 t))) | |
163 (if xterm-mouse-mode | 186 (if xterm-mouse-mode |
164 ;; Turn it on | 187 ;; Turn it on |
165 (unless window-system | 188 (unless window-system |
166 (setq mouse-position-function #'xterm-mouse-position-function) | 189 (setq mouse-position-function #'xterm-mouse-position-function) |
167 (turn-on-xterm-mouse-tracking)) | 190 (turn-on-xterm-mouse-tracking)) |