Commit cad2c4b1 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Tweak tty-find-type to allow TERM=screen.xterm

* lisp/faces.el (tty-find-type): Allow TERM=screen.xterm to find
term/screen.el (bug#45824).
parent f30cf07e
Pipeline #8863 passed with stages
in 14 minutes and 6 seconds
......@@ -2199,7 +2199,7 @@ the above example."
(not (funcall pred type)))
;; Strip off last hyphen and what follows, then try again
(setq type
(if (setq hyphend (string-match-p "[-_][^-_]+$" type))
(if (setq hyphend (string-match-p "[-_.][^-_.]+$" type))
(substring type 0 hyphend)
nil))))
type)
......
......@@ -217,5 +217,13 @@
))
)
(ert-deftest test-tty-find-type ()
(let ((pred (lambda (string)
(locate-library (concat "term/" string ".el")))))
(should (tty-find-type pred "cygwin"))
(should (tty-find-type pred "cygwin-foo"))
(should (equal (tty-find-type pred "xterm") "xterm"))
(should (equal (tty-find-type pred "screen.xterm") "screen"))))
(provide 'faces-tests)
;;; faces-tests.el ends here
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