diff options
| author | Luc Teirlinck | 2005-04-13 22:22:40 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2005-04-13 22:22:40 +0000 |
| commit | dc6ed0370d23f83dbd9fa83e2eb0017a4bc3bbbd (patch) | |
| tree | 4bf48ed31e64d64b6a432883f5b708894cb1ac3a | |
| parent | 4d727d1a8cac2c62f96b8efef8cd749d1e2539d5 (diff) | |
| download | emacs-dc6ed0370d23f83dbd9fa83e2eb0017a4bc3bbbd.tar.gz emacs-dc6ed0370d23f83dbd9fa83e2eb0017a4bc3bbbd.zip | |
(xterm-mouse-mode): Change :init value.
| -rw-r--r-- | lisp/xt-mouse.el | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 90e127487f5..62710e752a7 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el | |||
| @@ -162,23 +162,11 @@ single clicks are supported. When turned on, the normal xterm | |||
| 162 | mouse functionality for such clicks is still available by holding | 162 | mouse functionality for such clicks is still available by holding |
| 163 | down the SHIFT key while pressing the mouse button." | 163 | down the SHIFT key while pressing the mouse button." |
| 164 | :global t :group 'mouse | 164 | :global t :group 'mouse |
| 165 | ;; Do not change the :init-value below, without corresponding | 165 | ;; If you change the code below, you also need to change the |
| 166 | ;; changes in the related code in startup.el. | 166 | ;; corresponding code in startup.el. |
| 167 | :init-value (unless (or noninteractive | 167 | :init-value (unless (or noninteractive |
| 168 | window-system | 168 | window-system) |
| 169 | (null term-file-prefix)) | 169 | (let ((term (getenv "TERM"))) |
| 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 | 170 | (and term |
| 183 | (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" | 171 | (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" |
| 184 | term) | 172 | term) |