Commit dc6ed037 authored by Luc Teirlinck's avatar Luc Teirlinck
Browse files

(xterm-mouse-mode): Change :init value.

parent 4d727d1a
...@@ -162,23 +162,11 @@ single clicks are supported. When turned on, the normal xterm ...@@ -162,23 +162,11 @@ single clicks are supported. When turned on, the normal xterm
mouse functionality for such clicks is still available by holding mouse functionality for such clicks is still available by holding
down the SHIFT key while pressing the mouse button." down the SHIFT key while pressing the mouse button."
:global t :group 'mouse :global t :group 'mouse
;; Do not change the :init-value below, without corresponding ;; If you change the code below, you also need to change the
;; changes in the related code in startup.el. ;; corresponding code in startup.el.
:init-value (unless (or noninteractive :init-value (unless (or noninteractive
window-system window-system)
(null term-file-prefix)) (let ((term (getenv "TERM")))
(let ((term (getenv "TERM"))
hyphend)
(while
(and term
(not (load (concat term-file-prefix term) t t)))
;; Strip off last hyphen and what follows, then
;; try again
(setq term
(if (setq hyphend
(string-match "[-_][^-_]+$" term))
(substring term 0 hyphend)
nil)))
(and term (and term
(string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)"
term) term)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment