summaryrefslogtreecommitdiff
path: root/lisp/term/xterm.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2015-05-03 22:24:20 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2015-05-03 22:24:20 -0400
commit4183482f4dd3c1a96c817d1598024952b82a7e59 (patch)
treeb8e6e28a8ad99f4ce98f59a1703e707e043c0495 /lisp/term/xterm.el
parentb7bb71c801ecd9afa09f260ca7dbe7a5677cf9e0 (diff)
downloademacs-4183482f4dd3c1a96c817d1598024952b82a7e59.tar.gz
* lisp/term/screen.el (xterm-screen-extra-capabilities): New custom
(terminal-init-screen): Use it (bug#20356). * lisp/term/xterm.el: Provide `term/xterm' instead of `xterm'. (xterm--extra-capabilities-type): New const. (xterm-extra-capabilities): Use it. (xterm--version-handler): Lower the pseudo-version for `screen'.
Diffstat (limited to 'lisp/term/xterm.el')
-rw-r--r--lisp/term/xterm.el27
1 files changed, 16 insertions, 11 deletions
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 726ecf91f85..79699c6fe43 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -29,6 +29,13 @@
:version "24.1"
:group 'terminals)
+(defconst xterm--extra-capabilities-type
+ ;; NOTE: If you add entries here, make sure to update
+ ;; `terminal-init-xterm' as well.
+ '(set (const :tag "modifyOtherKeys support" modifyOtherKeys)
+ (const :tag "report background" reportBackground)
+ (const :tag "set X selection" setSelection)))
+
(defcustom xterm-extra-capabilities 'check
"Whether Xterm supports some additional, more modern, features.
If nil, just assume that it does not.
@@ -40,13 +47,8 @@ The relevant features are:
reportBackground -- if supported, Xterm reports its background color
setSelection -- if supported, Xterm saves yanked text to the X selection"
:version "24.1"
- :type '(choice (const :tag "No" nil)
- (const :tag "Check" check)
- ;; NOTE: If you add entries here, make sure to update
- ;; `terminal-init-xterm' as well.
- (set (const :tag "modifyOtherKeys support" modifyOtherKeys)
- (const :tag "report background" reportBackground)
- (const :tag "set X selection" setSelection))))
+ :type `(choice (const :tag "Check" check)
+ ,xterm--extra-capabilities-type))
(defcustom xterm-max-cut-length 100000
"Maximum number of bytes to cut into xterm using the OSC 52 sequence.
@@ -623,8 +625,11 @@ string bytes that can be copied is 3/4 of this value."
(setq version 200))
(when (equal (match-string 1 str) "83")
;; `screen' (which returns 83;40003;0) seems to also lack support for
- ;; some of these (bug#17607).
- (setq version 240))
+ ;; some of these (bug#17607, bug#20356).
+ ;; Note: this code path should normally not be used any more
+ ;; since term/screen.el now binds xterm-extra-capabilities
+ ;; to a fixed value, rather than using the dynamic checking.
+ (setq version 200))
;; If version is 242 or higher, assume the xterm supports
;; reporting the background color (TODO: maybe earlier
;; versions do too...)
@@ -925,6 +930,6 @@ versions of xterm."
(set-terminal-parameter nil 'background-mode 'dark)
t))
-(provide 'xterm)
-
+(provide 'xterm) ;Backward compatibility.
+(provide 'term/xterm)
;;; xterm.el ends here