[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116893: Introduce `term-file-aliases', replacing so
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r116893: Introduce `term-file-aliases', replacing some small lisp/term files |
Date: |
Fri, 28 Mar 2014 01:30:00 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116893
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2014-03-27 21:29:54 -0400
message:
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.
removed:
lisp/term/apollo.el apollo.el-20091113204419-o5vbwnq5f7feedwu-404
lisp/term/vt102.el vt102.el-20091113204419-o5vbwnq5f7feedwu-1441
lisp/term/vt125.el vt125.el-20091113204419-o5vbwnq5f7feedwu-1442
lisp/term/vt201.el vt201.el-20091113204419-o5vbwnq5f7feedwu-585
lisp/term/vt220.el vt220.el-20091113204419-o5vbwnq5f7feedwu-586
lisp/term/vt240.el vt240.el-20091113204419-o5vbwnq5f7feedwu-587
lisp/term/vt300.el vt300.el-20091113204419-o5vbwnq5f7feedwu-1443
lisp/term/vt320.el vt320.el-20091113204419-o5vbwnq5f7feedwu-1444
lisp/term/vt400.el vt400.el-20091113204419-o5vbwnq5f7feedwu-1445
lisp/term/vt420.el vt420.el-20091113204419-o5vbwnq5f7feedwu-1446
modified:
doc/emacs/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-6227
doc/emacs/custom.texi
custom.texi-20091113204419-o5vbwnq5f7feedwu-6240
doc/lispref/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-6155
doc/lispref/os.texi os.texi-20091113204419-o5vbwnq5f7feedwu-6205
etc/NEWS news-20100311060928-aoit31wvzf25yr1z-1
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/faces.el faces.el-20091113204419-o5vbwnq5f7feedwu-562
lisp/term/AT386.el at386.el-20091113204419-o5vbwnq5f7feedwu-1440
lisp/term/README readme-20091113204419-o5vbwnq5f7feedwu-553
lisp/term/news.el news.el-20091113204419-o5vbwnq5f7feedwu-38
lisp/term/tvi970.el tvi970.el-20091113204419-o5vbwnq5f7feedwu-456
lisp/term/vt100.el vt100.el-20091113204419-o5vbwnq5f7feedwu-394
lisp/term/wyse50.el wyse50.el-20091113204419-o5vbwnq5f7feedwu-182
=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog 2014-03-26 01:41:13 +0000
+++ b/doc/emacs/ChangeLog 2014-03-28 01:29:54 +0000
@@ -1,3 +1,7 @@
+2014-03-28 Glenn Morris <address@hidden>
+
+ * custom.texi (Terminal Init): Mention term-file-aliases.
+
2014-03-26 Glenn Morris <address@hidden>
* ack.texi (Acknowledgments): Remove reference to obsolete file.
=== modified file 'doc/emacs/custom.texi'
--- a/doc/emacs/custom.texi 2014-02-28 05:30:28 +0000
+++ b/doc/emacs/custom.texi 2014-03-28 01:29:54 +0000
@@ -2445,9 +2445,13 @@
@node Terminal Init
@subsection Terminal-specific Initialization
address@hidden term-file-aliases
Each terminal type can have a Lisp library to be loaded into Emacs when
it is run on that type of terminal. For a terminal type named
address@hidden, the library is called @file{term/@var{termtype}} and it is
address@hidden, the library is called @file{term/@var{termtype}}.
+(If there is an entry of the form @code{(@var{termtype} . @var{alias})}
+in the @code{term-file-aliases} association list, Emacs uses
address@hidden in place of @var{termtype}.) The library is
found by searching the directories @code{load-path} as usual and trying the
suffixes @samp{.elc} and @samp{.el}. Normally it appears in the
subdirectory @file{term} of the directory where most Emacs libraries are
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog 2014-03-26 15:57:13 +0000
+++ b/doc/lispref/ChangeLog 2014-03-28 01:29:54 +0000
@@ -1,3 +1,7 @@
+2014-03-28 Glenn Morris <address@hidden>
+
+ * os.texi (Terminal-Specific): Mention term-file-aliases.
+
2014-03-26 Eli Zaretskii <address@hidden>
* files.texi (Kinds of Files): Improve documentation of
=== modified file 'doc/lispref/os.texi'
--- a/doc/lispref/os.texi 2014-03-18 01:19:03 +0000
+++ b/doc/lispref/os.texi 2014-03-28 01:29:54 +0000
@@ -430,10 +430,13 @@
run on that type of terminal. The library's name is constructed by
concatenating the value of the variable @code{term-file-prefix} and the
terminal type (specified by the environment variable @env{TERM}).
-Normally, @code{term-file-prefix} has the value
address@hidden"term/"}; changing this is not recommended. Emacs finds the file
-in the normal manner, by searching the @code{load-path} directories, and
-trying the @samp{.elc} and @samp{.el} suffixes.
+Normally, @code{term-file-prefix} has the value @code{"term/"};
+changing this is not recommended. If there is an entry matching
address@hidden in the @code{term-file-aliases} association list,
+Emacs uses the associated value in place of @env{TERM}.
+Emacs finds the file in the normal manner, by searching the
address@hidden directories, and trying the @samp{.elc} and
address@hidden suffixes.
@cindex Termcap
The usual role of a terminal-specific library is to enable special
@@ -479,6 +482,13 @@
On MS-DOS, Emacs sets the @env{TERM} environment variable to @samp{internal}.
@end defvar
address@hidden term-file-aliases
+This variable is an an association list mapping terminal types to
+their aliases. For example, an element of the form @code{("vt102"
+. "vt100")} means to treat a terminal of type @samp{vt102} like one of
+type @samp{vt100}.
address@hidden defvar
+
@defvar tty-setup-hook
This variable is a normal hook that Emacs runs after initializing a
new text terminal. (This applies when Emacs starts up in non-windowed
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2014-03-27 19:41:57 +0000
+++ b/etc/NEWS 2014-03-28 01:29:54 +0000
@@ -36,6 +36,11 @@
---
** The default value of `history-length' has increased to 100.
++++
+** The new variable `term-file-aliases' replaces some files from lisp/term.
+The function `tty-run-terminal-initialization' consults this variable
+when deciding what terminal-specific initialization code to run.
+
* Editing Changes in Emacs 24.5
@@ -413,8 +418,9 @@
+++
*** `electric-indent-mode' is now enabled by default.
-E.g., typing RET reindents the current line and indents the new line.
-`C-j' inserts a newline but does not indent.
+Typing RET reindents the current line and indents the new line.
+`C-j' inserts a newline but does not indent. In some programming modes,
+additional characters are electric (eg `{').
+++
*** New buffer-local `electric-indent-local-mode'.
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-03-27 20:57:23 +0000
+++ b/lisp/ChangeLog 2014-03-28 01:29:54 +0000
@@ -1,3 +1,11 @@
+2014-03-28 Glenn Morris <address@hidden>
+
+ * faces.el (term-file-aliases): New variable.
+ (tty-run-terminal-initialization): Respect term-file-aliases.
+ * term/apollo.el, term/vt102.el, term/vt125.el, term/vt201.el:
+ * term/vt220.el, term/vt240.el, term/vt300.el, term/vt320.el:
+ * term/vt400.el, term/vt420.el: Remove files, replaced by aliases.
+
2014-03-27 Glenn Morris <address@hidden>
* startup.el (inhibit-startup-hooks): Doc tweak.
=== modified file 'lisp/faces.el'
--- a/lisp/faces.el 2014-03-22 08:28:20 +0000
+++ b/lisp/faces.el 2014-03-28 01:29:54 +0000
@@ -2110,16 +2110,36 @@
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
=== modified file 'lisp/term/AT386.el'
--- a/lisp/term/AT386.el 2014-01-01 07:43:34 +0000
+++ b/lisp/term/AT386.el 2014-03-28 01:29:54 +0000
@@ -22,8 +22,6 @@
;;; Commentary:
-;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
-
;;; Code:
(defun terminal-init-AT386 ()
=== modified file 'lisp/term/README'
--- a/lisp/term/README 2014-01-10 07:10:37 +0000
+++ b/lisp/term/README 2014-03-28 01:29:54 +0000
@@ -5,9 +5,11 @@
This directory contains files of elisp that customize Emacs for certain
terminal types.
- When Emacs opens a new terminal, it checks the TERM environment variable to
-see what type of terminal the user is running on, searches for an elisp file
-named "term/${TERM}.el", and if one exists, loads it. If Emacs finds no
+ When Emacs opens a new terminal, it checks the TERM environment variable
+to see what type of terminal the user is running on. (If there is an entry
+for TERM in the `term-file-aliases' variable, Emacs uses the associated value
+in place of TERM in the following.) Emacs searches for an elisp file named
+"term/${TERM}.el", and if one exists, loads it. If Emacs finds no
suitable file, then it strips the last hyphen and what follows it from TERM,
and tries again. If that still doesn't yield a file, then the previous hyphen
is stripped, and so on until all hyphens are gone. For example, if the
=== removed file 'lisp/term/apollo.el'
--- a/lisp/term/apollo.el 2012-05-01 06:59:34 +0000
+++ b/lisp/term/apollo.el 1970-01-01 00:00:00 +0000
@@ -1,5 +0,0 @@
-(defun terminal-init-apollo ()
- "Terminal initialization function for apollo."
- (tty-run-terminal-initialization (selected-frame) "vt100"))
-
-;;; apollo.el ends here
=== modified file 'lisp/term/news.el'
--- a/lisp/term/news.el 2014-01-01 07:43:34 +0000
+++ b/lisp/term/news.el 2014-03-28 01:29:54 +0000
@@ -22,8 +22,6 @@
;;; Commentary:
-;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
-
;;; Code:
(defun terminal-init-news ()
=== modified file 'lisp/term/tvi970.el'
--- a/lisp/term/tvi970.el 2014-01-01 07:43:34 +0000
+++ b/lisp/term/tvi970.el 2014-03-28 01:29:54 +0000
@@ -23,8 +23,6 @@
;;; Commentary:
-;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
-
;;; Code:
(defvar tvi970-terminal-map
=== modified file 'lisp/term/vt100.el'
--- a/lisp/term/vt100.el 2014-01-01 07:43:34 +0000
+++ b/lisp/term/vt100.el 2014-03-28 01:29:54 +0000
@@ -22,8 +22,6 @@
;;; Commentary:
-;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
-
;; Handles all VT100 clones, including the Apollo terminal. Also handles
;; the VT200 --- its PF- and arrow- keys are different, but all those
;; are really set up by the terminal initialization code, which mines them
=== removed file 'lisp/term/vt102.el'
--- a/lisp/term/vt102.el 2012-05-01 06:59:34 +0000
+++ b/lisp/term/vt102.el 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-
-(defun terminal-init-vt102 ()
- "Terminal initialization function for vt102."
- (tty-run-terminal-initialization (selected-frame) "vt100"))
-
-;;; vt102.el ends here
=== removed file 'lisp/term/vt125.el'
--- a/lisp/term/vt125.el 2012-05-01 06:59:34 +0000
+++ b/lisp/term/vt125.el 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-
-(defun terminal-init-vt125 ()
- "Terminal initialization function for vt125."
- (tty-run-terminal-initialization (selected-frame) "vt100"))
-
-;;; vt125.el ends here
=== removed file 'lisp/term/vt201.el'
--- a/lisp/term/vt201.el 2012-05-01 06:59:34 +0000
+++ b/lisp/term/vt201.el 1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
-;; For our purposes we can treat the vt200 and vt100 almost alike.
-;; Most differences are handled by the termcap entry.
-(defun terminal-init-vt201 ()
- "Terminal initialization function for vt201."
- (tty-run-terminal-initialization (selected-frame) "vt100")
- ;; Make F11 an escape key.
- (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
- (define-key local-function-key-map [f11] [?\e]))
-
-;;; vt201.el ends here
=== removed file 'lisp/term/vt220.el'
--- a/lisp/term/vt220.el 2012-05-01 06:59:34 +0000
+++ b/lisp/term/vt220.el 1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
-;; For our purposes we can treat the vt200 and vt100 almost alike.
-;; Most differences are handled by the termcap entry.
-(defun terminal-init-vt220 ()
- "Terminal initialization function for vt220."
- (tty-run-terminal-initialization (selected-frame) "vt100")
- ;; Make F11 an escape key.
- (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
- (define-key local-function-key-map [f11] [?\e]))
-
-;;; vt220.el ends here
=== removed file 'lisp/term/vt240.el'
--- a/lisp/term/vt240.el 2012-05-01 06:59:34 +0000
+++ b/lisp/term/vt240.el 1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
-;; For our purposes we can treat the vt200 and vt100 almost alike.
-;; Most differences are handled by the termcap entry.
-(defun terminal-init-vt240 ()
- "Terminal initialization function for vt240."
- (tty-run-terminal-initialization (selected-frame) "vt100")
- ;; Make F11 an escape key.
- (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
- (define-key local-function-key-map [f11] [?\e]))
-
-;;; vt240.el ends here
=== removed file 'lisp/term/vt300.el'
--- a/lisp/term/vt300.el 2012-05-01 06:59:34 +0000
+++ b/lisp/term/vt300.el 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-(defun terminal-init-vt300 ()
- "Terminal initialization function for vt300."
- (tty-run-terminal-initialization (selected-frame) "vt100")
- ;; Make F11 an escape key.
- (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
- (define-key local-function-key-map [f11] [?\e]))
-
-;;; vt300.el ends here
=== removed file 'lisp/term/vt320.el'
--- a/lisp/term/vt320.el 2012-05-01 06:59:34 +0000
+++ b/lisp/term/vt320.el 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-(defun terminal-init-vt320 ()
- "Terminal initialization function for vt320."
- (tty-run-terminal-initialization (selected-frame) "vt100")
- ;; Make F11 an escape key.
- (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
- (define-key local-function-key-map [f11] [?\e]))
-
-;;; vt320.el ends here
=== removed file 'lisp/term/vt400.el'
--- a/lisp/term/vt400.el 2012-05-01 06:59:34 +0000
+++ b/lisp/term/vt400.el 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-(defun terminal-init-vt400 ()
- "Terminal initialization function for vt400."
- (tty-run-terminal-initialization (selected-frame) "vt100")
- ;; Make F11 an escape key.
- (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
- (define-key local-function-key-map [f11] [?\e]))
-
-;;; vt400.el ends here
=== removed file 'lisp/term/vt420.el'
--- a/lisp/term/vt420.el 2012-05-01 06:59:34 +0000
+++ b/lisp/term/vt420.el 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-(defun terminal-init-vt420 ()
- "Terminal initialization function for vt420."
- (tty-run-terminal-initialization (selected-frame) "vt100")
- ;; Make F11 an escape key.
- (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
- (define-key local-function-key-map [f11] [?\e]))
-
-;;; vt420.el ends here
=== modified file 'lisp/term/wyse50.el'
--- a/lisp/term/wyse50.el 2014-02-25 08:41:47 +0000
+++ b/lisp/term/wyse50.el 2014-03-28 01:29:54 +0000
@@ -23,7 +23,6 @@
;;; Commentary:
-;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
;; Rewritten for Emacs 19 by jimb, January 1992
;; Cleaned up for new terminal package conventions by esr, March 1993
;; Should work well for Televideo TVI 925 although it's overkill.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116893: Introduce `term-file-aliases', replacing some small lisp/term files,
Glenn Morris <=