aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-03-27 21:29:54 -0400
committerGlenn Morris2014-03-27 21:29:54 -0400
commit95de732d843a80a5061842d230a739190d00dfee (patch)
tree4180e5f97dba8ff5b111b23ee605b804143f8a64
parent4e74624db143b93fbc3829b0af17da26b4ea6fb6 (diff)
downloademacs-95de732d843a80a5061842d230a739190d00dfee.tar.gz
emacs-95de732d843a80a5061842d230a739190d00dfee.zip
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.
-rw-r--r--doc/emacs/ChangeLog4
-rw-r--r--doc/emacs/custom.texi6
-rw-r--r--doc/lispref/ChangeLog4
-rw-r--r--doc/lispref/os.texi18
-rw-r--r--etc/NEWS10
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/faces.el20
-rw-r--r--lisp/term/AT386.el2
-rw-r--r--lisp/term/README8
-rw-r--r--lisp/term/apollo.el5
-rw-r--r--lisp/term/news.el2
-rw-r--r--lisp/term/tvi970.el2
-rw-r--r--lisp/term/vt100.el2
-rw-r--r--lisp/term/vt102.el6
-rw-r--r--lisp/term/vt125.el6
-rw-r--r--lisp/term/vt201.el10
-rw-r--r--lisp/term/vt220.el10
-rw-r--r--lisp/term/vt240.el10
-rw-r--r--lisp/term/vt300.el8
-rw-r--r--lisp/term/vt320.el8
-rw-r--r--lisp/term/vt400.el8
-rw-r--r--lisp/term/vt420.el8
-rw-r--r--lisp/term/wyse50.el1
23 files changed, 68 insertions, 98 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 36044d89ccd..507d9cb427a 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,7 @@
12014-03-28 Glenn Morris <rgm@gnu.org>
2
3 * custom.texi (Terminal Init): Mention term-file-aliases.
4
12014-03-26 Glenn Morris <rgm@gnu.org> 52014-03-26 Glenn Morris <rgm@gnu.org>
2 6
3 * ack.texi (Acknowledgments): Remove reference to obsolete file. 7 * ack.texi (Acknowledgments): Remove reference to obsolete file.
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index bb02f1e7c9f..5dbcac77f86 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -2445,9 +2445,13 @@ harmless, so those do not need a conditional.
2445@node Terminal Init 2445@node Terminal Init
2446@subsection Terminal-specific Initialization 2446@subsection Terminal-specific Initialization
2447 2447
2448@vindex term-file-aliases
2448 Each terminal type can have a Lisp library to be loaded into Emacs when 2449 Each terminal type can have a Lisp library to be loaded into Emacs when
2449it is run on that type of terminal. For a terminal type named 2450it is run on that type of terminal. For a terminal type named
2450@var{termtype}, the library is called @file{term/@var{termtype}} and it is 2451@var{termtype}, the library is called @file{term/@var{termtype}}.
2452(If there is an entry of the form @code{(@var{termtype} . @var{alias})}
2453in the @code{term-file-aliases} association list, Emacs uses
2454@var{alias} in place of @var{termtype}.) The library is
2451found by searching the directories @code{load-path} as usual and trying the 2455found by searching the directories @code{load-path} as usual and trying the
2452suffixes @samp{.elc} and @samp{.el}. Normally it appears in the 2456suffixes @samp{.elc} and @samp{.el}. Normally it appears in the
2453subdirectory @file{term} of the directory where most Emacs libraries are 2457subdirectory @file{term} of the directory where most Emacs libraries are
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index fdc266472e0..5c0941b7918 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,7 @@
12014-03-28 Glenn Morris <rgm@gnu.org>
2
3 * os.texi (Terminal-Specific): Mention term-file-aliases.
4
12014-03-26 Eli Zaretskii <eliz@gnu.org> 52014-03-26 Eli Zaretskii <eliz@gnu.org>
2 6
3 * files.texi (Kinds of Files): Improve documentation of 7 * files.texi (Kinds of Files): Improve documentation of
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index df30ac12e2e..8706d898888 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -430,10 +430,13 @@ This variable holds the name of the @file{.emacs.d} directory. It is
430run on that type of terminal. The library's name is constructed by 430run on that type of terminal. The library's name is constructed by
431concatenating the value of the variable @code{term-file-prefix} and the 431concatenating the value of the variable @code{term-file-prefix} and the
432terminal type (specified by the environment variable @env{TERM}). 432terminal type (specified by the environment variable @env{TERM}).
433Normally, @code{term-file-prefix} has the value 433Normally, @code{term-file-prefix} has the value @code{"term/"};
434@code{"term/"}; changing this is not recommended. Emacs finds the file 434changing this is not recommended. If there is an entry matching
435in the normal manner, by searching the @code{load-path} directories, and 435@env{TERM} in the @code{term-file-aliases} association list,
436trying the @samp{.elc} and @samp{.el} suffixes. 436Emacs uses the associated value in place of @env{TERM}.
437Emacs finds the file in the normal manner, by searching the
438@code{load-path} directories, and trying the @samp{.elc} and
439@samp{.el} suffixes.
437 440
438@cindex Termcap 441@cindex Termcap
439 The usual role of a terminal-specific library is to enable special 442 The usual role of a terminal-specific library is to enable special
@@ -479,6 +482,13 @@ terminal-initialization file.
479On MS-DOS, Emacs sets the @env{TERM} environment variable to @samp{internal}. 482On MS-DOS, Emacs sets the @env{TERM} environment variable to @samp{internal}.
480@end defvar 483@end defvar
481 484
485@defvar term-file-aliases
486This variable is an an association list mapping terminal types to
487their aliases. For example, an element of the form @code{("vt102"
488. "vt100")} means to treat a terminal of type @samp{vt102} like one of
489type @samp{vt100}.
490@end defvar
491
482@defvar tty-setup-hook 492@defvar tty-setup-hook
483This variable is a normal hook that Emacs runs after initializing a 493This variable is a normal hook that Emacs runs after initializing a
484new text terminal. (This applies when Emacs starts up in non-windowed 494new text terminal. (This applies when Emacs starts up in non-windowed
diff --git a/etc/NEWS b/etc/NEWS
index 2ddcf845b78..0265f2604bf 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -36,6 +36,11 @@ otherwise leave it unmarked.
36--- 36---
37** The default value of `history-length' has increased to 100. 37** The default value of `history-length' has increased to 100.
38 38
39+++
40** The new variable `term-file-aliases' replaces some files from lisp/term.
41The function `tty-run-terminal-initialization' consults this variable
42when deciding what terminal-specific initialization code to run.
43
39 44
40* Editing Changes in Emacs 24.5 45* Editing Changes in Emacs 24.5
41 46
@@ -413,8 +418,9 @@ means to always load the .elc file.
413 418
414+++ 419+++
415*** `electric-indent-mode' is now enabled by default. 420*** `electric-indent-mode' is now enabled by default.
416E.g., typing RET reindents the current line and indents the new line. 421Typing RET reindents the current line and indents the new line.
417`C-j' inserts a newline but does not indent. 422`C-j' inserts a newline but does not indent. In some programming modes,
423additional characters are electric (eg `{').
418 424
419+++ 425+++
420*** New buffer-local `electric-indent-local-mode'. 426*** New buffer-local `electric-indent-local-mode'.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1054db7c118..2cd29d8a5c9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12014-03-28 Glenn Morris <rgm@gnu.org>
2
3 * faces.el (term-file-aliases): New variable.
4 (tty-run-terminal-initialization): Respect term-file-aliases.
5 * term/apollo.el, term/vt102.el, term/vt125.el, term/vt201.el:
6 * term/vt220.el, term/vt240.el, term/vt300.el, term/vt320.el:
7 * term/vt400.el, term/vt420.el: Remove files, replaced by aliases.
8
12014-03-27 Glenn Morris <rgm@gnu.org> 92014-03-27 Glenn Morris <rgm@gnu.org>
2 10
3 * startup.el (inhibit-startup-hooks): Doc tweak. 11 * startup.el (inhibit-startup-hooks): Doc tweak.
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."
2110Specifically, `tty-run-terminal-initialization' runs this. 2110Specifically, `tty-run-terminal-initialization' runs this.
2111This can be used to fine tune the `input-decode-map', for example.") 2111This can be used to fine tune the `input-decode-map', for example.")
2112 2112
2113(defvar term-file-aliases
2114 '(("apollo" . "vt100")
2115 ("vt102" . "vt100")
2116 ("vt125" . "vt100")
2117 ("vt201" . "vt200")
2118 ("vt220" . "vt200")
2119 ("vt240" . "vt200")
2120 ("vt300" . "vt200")
2121 ("vt320" . "vt200")
2122 ("vt400" . "vt200")
2123 ("vt420" . "vt200")
2124 )
2125 "Alist of terminal type aliases.
2126Entries are of the form (TYPE . ALIAS), where both elements are strings.
2127This means to treat a terminal of type TYPE as if it were of type ALIAS.")
2128
2113(defun tty-run-terminal-initialization (frame &optional type run-hook) 2129(defun tty-run-terminal-initialization (frame &optional type run-hook)
2114 "Run the special initialization code for the terminal type of FRAME. 2130 "Run the special initialization code for the terminal type of FRAME.
2115The optional TYPE parameter may be used to override the autodetected 2131The optional TYPE parameter may be used to override the autodetected
2116terminal type to a different value. 2132terminal type to a different value.
2117 2133
2134This consults `term-file-aliases' to map terminal types to their aliases.
2135
2118If optional argument RUN-HOOK is non-nil, then as a final step, 2136If optional argument RUN-HOOK is non-nil, then as a final step,
2119this runs the hook `tty-setup-hook'. 2137this runs the hook `tty-setup-hook'.
2120 2138
2121If you set `term-file-prefix' to nil, this function does nothing." 2139If you set `term-file-prefix' to nil, this function does nothing."
2122 (setq type (or type (tty-type frame))) 2140 (setq type (or type (tty-type frame)))
2141 (let ((alias (assoc type term-file-aliases)))
2142 (if alias (setq type (cdr alias))))
2123 ;; Load library for our terminal type. 2143 ;; Load library for our terminal type.
2124 ;; User init file can set term-file-prefix to nil to prevent this. 2144 ;; User init file can set term-file-prefix to nil to prevent this.
2125 (with-selected-frame frame 2145 (with-selected-frame frame
diff --git a/lisp/term/AT386.el b/lisp/term/AT386.el
index 9750da15c72..dc6899e3835 100644
--- a/lisp/term/AT386.el
+++ b/lisp/term/AT386.el
@@ -22,8 +22,6 @@
22 22
23;;; Commentary: 23;;; Commentary:
24 24
25;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
26
27;;; Code: 25;;; Code:
28 26
29(defun terminal-init-AT386 () 27(defun terminal-init-AT386 ()
diff --git a/lisp/term/README b/lisp/term/README
index b8756c3873d..b523063c0fd 100644
--- a/lisp/term/README
+++ b/lisp/term/README
@@ -5,9 +5,11 @@ See the end of the file for license conditions.
5 This directory contains files of elisp that customize Emacs for certain 5 This directory contains files of elisp that customize Emacs for certain
6terminal types. 6terminal types.
7 7
8 When Emacs opens a new terminal, it checks the TERM environment variable to 8 When Emacs opens a new terminal, it checks the TERM environment variable
9see what type of terminal the user is running on, searches for an elisp file 9to see what type of terminal the user is running on. (If there is an entry
10named "term/${TERM}.el", and if one exists, loads it. If Emacs finds no 10for TERM in the `term-file-aliases' variable, Emacs uses the associated value
11in place of TERM in the following.) Emacs searches for an elisp file named
12"term/${TERM}.el", and if one exists, loads it. If Emacs finds no
11suitable file, then it strips the last hyphen and what follows it from TERM, 13suitable file, then it strips the last hyphen and what follows it from TERM,
12and tries again. If that still doesn't yield a file, then the previous hyphen 14and tries again. If that still doesn't yield a file, then the previous hyphen
13is stripped, and so on until all hyphens are gone. For example, if the 15is stripped, and so on until all hyphens are gone. For example, if the
diff --git a/lisp/term/apollo.el b/lisp/term/apollo.el
deleted file mode 100644
index e4cabac3bf1..00000000000
--- a/lisp/term/apollo.el
+++ /dev/null
@@ -1,5 +0,0 @@
1(defun terminal-init-apollo ()
2 "Terminal initialization function for apollo."
3 (tty-run-terminal-initialization (selected-frame) "vt100"))
4
5;;; apollo.el ends here
diff --git a/lisp/term/news.el b/lisp/term/news.el
index a58ff76aefe..a1e459a1261 100644
--- a/lisp/term/news.el
+++ b/lisp/term/news.el
@@ -22,8 +22,6 @@
22 22
23;;; Commentary: 23;;; Commentary:
24 24
25;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
26
27;;; Code: 25;;; Code:
28 26
29(defun terminal-init-news () 27(defun terminal-init-news ()
diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el
index 841d88d4e19..3b77ab46400 100644
--- a/lisp/term/tvi970.el
+++ b/lisp/term/tvi970.el
@@ -23,8 +23,6 @@
23 23
24;;; Commentary: 24;;; Commentary:
25 25
26;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
27
28;;; Code: 26;;; Code:
29 27
30(defvar tvi970-terminal-map 28(defvar tvi970-terminal-map
diff --git a/lisp/term/vt100.el b/lisp/term/vt100.el
index 19e64d2bd90..6761e83891e 100644
--- a/lisp/term/vt100.el
+++ b/lisp/term/vt100.el
@@ -22,8 +22,6 @@
22 22
23;;; Commentary: 23;;; Commentary:
24 24
25;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
26
27;; Handles all VT100 clones, including the Apollo terminal. Also handles 25;; Handles all VT100 clones, including the Apollo terminal. Also handles
28;; the VT200 --- its PF- and arrow- keys are different, but all those 26;; the VT200 --- its PF- and arrow- keys are different, but all those
29;; are really set up by the terminal initialization code, which mines them 27;; are really set up by the terminal initialization code, which mines them
diff --git a/lisp/term/vt102.el b/lisp/term/vt102.el
deleted file mode 100644
index 261b0bb5fd6..00000000000
--- a/lisp/term/vt102.el
+++ /dev/null
@@ -1,6 +0,0 @@
1
2(defun terminal-init-vt102 ()
3 "Terminal initialization function for vt102."
4 (tty-run-terminal-initialization (selected-frame) "vt100"))
5
6;;; vt102.el ends here
diff --git a/lisp/term/vt125.el b/lisp/term/vt125.el
deleted file mode 100644
index 2b2098d483d..00000000000
--- a/lisp/term/vt125.el
+++ /dev/null
@@ -1,6 +0,0 @@
1
2(defun terminal-init-vt125 ()
3 "Terminal initialization function for vt125."
4 (tty-run-terminal-initialization (selected-frame) "vt100"))
5
6;;; vt125.el ends here
diff --git a/lisp/term/vt201.el b/lisp/term/vt201.el
deleted file mode 100644
index a65b4737731..00000000000
--- a/lisp/term/vt201.el
+++ /dev/null
@@ -1,10 +0,0 @@
1;; For our purposes we can treat the vt200 and vt100 almost alike.
2;; Most differences are handled by the termcap entry.
3(defun terminal-init-vt201 ()
4 "Terminal initialization function for vt201."
5 (tty-run-terminal-initialization (selected-frame) "vt100")
6 ;; Make F11 an escape key.
7 (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
8 (define-key local-function-key-map [f11] [?\e]))
9
10;;; vt201.el ends here
diff --git a/lisp/term/vt220.el b/lisp/term/vt220.el
deleted file mode 100644
index 0dd43353c55..00000000000
--- a/lisp/term/vt220.el
+++ /dev/null
@@ -1,10 +0,0 @@
1;; For our purposes we can treat the vt200 and vt100 almost alike.
2;; Most differences are handled by the termcap entry.
3(defun terminal-init-vt220 ()
4 "Terminal initialization function for vt220."
5 (tty-run-terminal-initialization (selected-frame) "vt100")
6 ;; Make F11 an escape key.
7 (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
8 (define-key local-function-key-map [f11] [?\e]))
9
10;;; vt220.el ends here
diff --git a/lisp/term/vt240.el b/lisp/term/vt240.el
deleted file mode 100644
index b58d4211ce7..00000000000
--- a/lisp/term/vt240.el
+++ /dev/null
@@ -1,10 +0,0 @@
1;; For our purposes we can treat the vt200 and vt100 almost alike.
2;; Most differences are handled by the termcap entry.
3(defun terminal-init-vt240 ()
4 "Terminal initialization function for vt240."
5 (tty-run-terminal-initialization (selected-frame) "vt100")
6 ;; Make F11 an escape key.
7 (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
8 (define-key local-function-key-map [f11] [?\e]))
9
10;;; vt240.el ends here
diff --git a/lisp/term/vt300.el b/lisp/term/vt300.el
deleted file mode 100644
index a2664552a64..00000000000
--- a/lisp/term/vt300.el
+++ /dev/null
@@ -1,8 +0,0 @@
1(defun terminal-init-vt300 ()
2 "Terminal initialization function for vt300."
3 (tty-run-terminal-initialization (selected-frame) "vt100")
4 ;; Make F11 an escape key.
5 (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
6 (define-key local-function-key-map [f11] [?\e]))
7
8;;; vt300.el ends here
diff --git a/lisp/term/vt320.el b/lisp/term/vt320.el
deleted file mode 100644
index 08ed9a8ffb9..00000000000
--- a/lisp/term/vt320.el
+++ /dev/null
@@ -1,8 +0,0 @@
1(defun terminal-init-vt320 ()
2 "Terminal initialization function for vt320."
3 (tty-run-terminal-initialization (selected-frame) "vt100")
4 ;; Make F11 an escape key.
5 (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
6 (define-key local-function-key-map [f11] [?\e]))
7
8;;; vt320.el ends here
diff --git a/lisp/term/vt400.el b/lisp/term/vt400.el
deleted file mode 100644
index ad4a5fdbb4f..00000000000
--- a/lisp/term/vt400.el
+++ /dev/null
@@ -1,8 +0,0 @@
1(defun terminal-init-vt400 ()
2 "Terminal initialization function for vt400."
3 (tty-run-terminal-initialization (selected-frame) "vt100")
4 ;; Make F11 an escape key.
5 (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
6 (define-key local-function-key-map [f11] [?\e]))
7
8;;; vt400.el ends here
diff --git a/lisp/term/vt420.el b/lisp/term/vt420.el
deleted file mode 100644
index f6745a3953a..00000000000
--- a/lisp/term/vt420.el
+++ /dev/null
@@ -1,8 +0,0 @@
1(defun terminal-init-vt420 ()
2 "Terminal initialization function for vt420."
3 (tty-run-terminal-initialization (selected-frame) "vt100")
4 ;; Make F11 an escape key.
5 (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
6 (define-key local-function-key-map [f11] [?\e]))
7
8;;; vt420.el ends here
diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el
index aa9ba43d3d7..77c1655dfd1 100644
--- a/lisp/term/wyse50.el
+++ b/lisp/term/wyse50.el
@@ -23,7 +23,6 @@
23 23
24;;; Commentary: 24;;; Commentary:
25 25
26;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
27;; Rewritten for Emacs 19 by jimb, January 1992 26;; Rewritten for Emacs 19 by jimb, January 1992
28;; Cleaned up for new terminal package conventions by esr, March 1993 27;; Cleaned up for new terminal package conventions by esr, March 1993
29;; Should work well for Televideo TVI 925 although it's overkill. 28;; Should work well for Televideo TVI 925 although it's overkill.