summaryrefslogtreecommitdiff
path: root/lisp/faces.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-03-27 21:29:54 -0400
committerGlenn Morris <rgm@gnu.org>2014-03-27 21:29:54 -0400
commit95de732d843a80a5061842d230a739190d00dfee (patch)
tree4180e5f97dba8ff5b111b23ee605b804143f8a64 /lisp/faces.el
parent4e74624db143b93fbc3829b0af17da26b4ea6fb6 (diff)
downloademacs-95de732d843a80a5061842d230a739190d00dfee.tar.gz
Introduce `term-file-aliases', replacing some small lisp/term files
* lisp/faces.el (term-file-aliases): New variable. (tty-run-terminal-initialization): Respect term-file-aliases. * lisp/term/apollo.el, lisp/term/vt102.el, lisp/term/vt125.el: * lisp/term/vt201.el, lisp/term/vt220.el, lisp/term/vt240.el: * lisp/term/vt300.el, lisp/term/vt320.el, lisp/term/vt400.el: * lisp/term/vt420.el: Remove files, replaced by aliases. * lisp/term/README: Mention term-file-aliases. * lisp/term/AT386.el, lisp/term/news.el, lisp/term/tvi970.el: * lisp/term/vt100.el, lisp/term/wyse50.el: Remove obsolete comment. * doc/emacs/custom.texi (Terminal Init): Mention term-file-aliases. * doc/lispref/os.texi (Terminal-Specific): Mention term-file-aliases. * etc/NEWS: Mention this.
Diffstat (limited to 'lisp/faces.el')
-rw-r--r--lisp/faces.el20
1 files changed, 20 insertions, 0 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index e008993b49f..4a1fa687dee 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2110,16 +2110,36 @@ the above example."
Specifically, `tty-run-terminal-initialization' runs this.
This can be used to fine tune the `input-decode-map', for example.")
+(defvar term-file-aliases
+ '(("apollo" . "vt100")
+ ("vt102" . "vt100")
+ ("vt125" . "vt100")
+ ("vt201" . "vt200")
+ ("vt220" . "vt200")
+ ("vt240" . "vt200")
+ ("vt300" . "vt200")
+ ("vt320" . "vt200")
+ ("vt400" . "vt200")
+ ("vt420" . "vt200")
+ )
+ "Alist of terminal type aliases.
+Entries are of the form (TYPE . ALIAS), where both elements are strings.
+This means to treat a terminal of type TYPE as if it were of type ALIAS.")
+
(defun tty-run-terminal-initialization (frame &optional type run-hook)
"Run the special initialization code for the terminal type of FRAME.
The optional TYPE parameter may be used to override the autodetected
terminal type to a different value.
+This consults `term-file-aliases' to map terminal types to their aliases.
+
If optional argument RUN-HOOK is non-nil, then as a final step,
this runs the hook `tty-setup-hook'.
If you set `term-file-prefix' to nil, this function does nothing."
(setq type (or type (tty-type frame)))
+ (let ((alias (assoc type term-file-aliases)))
+ (if alias (setq type (cdr alias))))
;; Load library for our terminal type.
;; User init file can set term-file-prefix to nil to prevent this.
(with-selected-frame frame