aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-02-25 00:41:47 -0800
committerGlenn Morris2014-02-25 00:41:47 -0800
commit98bd6b321c3efbb5d7c5d3c0dbbcecbccf5fda3f (patch)
tree360d2816c6a875d5920a1f26c01cc4de437c38b1
parenta038bd8769ec54ecf7d7241ccef8decc0dc712b5 (diff)
downloademacs-98bd6b321c3efbb5d7c5d3c0dbbcecbccf5fda3f.tar.gz
emacs-98bd6b321c3efbb5d7c5d3c0dbbcecbccf5fda3f.zip
Doc updates related to tty-setup-hook
* doc/emacs/custom.texi (Terminal Init): Replace term-setup-hook with tty-setup-hook. * doc/lispref/display.texi (Window Systems): * doc/lispref/hooks.texi (Standard Hooks): Replace term-setup-hook with tty-setup-hook. * doc/lispref/os.texi (Startup Summary, Init File, Terminal-Specific): Replace term-setup-hook with tty-setup-hook, and update. * doc/misc/edt.texi (Quick start, Starting emulation): * doc/misc/efaq.texi (Fullscreen mode on MS-Windows) (Terminal setup code works after Emacs has begun): Update hook details. * doc/misc/vip.texi (Loading VIP): Fix hook example. * lisp/faces.el (tty-setup-hook, tty-run-terminal-initialization): Doc fixes. * lisp/startup.el (term-setup-hook): Doc fix. Make obsolete. * lisp/emulation/edt.el: Comment update. * lisp/term/sun.el (sun-raw-prefix-hooks): Use tty-setup-hook instead of term-setup-hook. (terminal-init-sun): Construct message from bytecomp plist. * lisp/term/wyse50.el (enable-arrow-keys): Doc fix. * etc/refcards/vipcard.tex: Hook fix. * etc/NEWS: Related edit.
-rw-r--r--doc/emacs/ChangeLog5
-rw-r--r--doc/emacs/custom.texi4
-rw-r--r--doc/lispref/ChangeLog9
-rw-r--r--doc/lispref/display.texi2
-rw-r--r--doc/lispref/hooks.texi5
-rw-r--r--doc/lispref/os.texi47
-rw-r--r--doc/misc/ChangeLog5
-rw-r--r--doc/misc/edt.texi4
-rw-r--r--doc/misc/efaq.texi12
-rw-r--r--doc/misc/vip.texi2
-rw-r--r--etc/ChangeLog4
-rw-r--r--etc/NEWS7
-rw-r--r--etc/refcards/vipcard.tex2
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/emulation/edt.el5
-rw-r--r--lisp/faces.el6
-rw-r--r--lisp/startup.el16
-rw-r--r--lisp/term/sun.el7
-rw-r--r--lisp/term/wyse50.el5
19 files changed, 98 insertions, 58 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 9fba16f4126..55c92de2462 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,8 @@
12014-02-25 Glenn Morris <rgm@gnu.org>
2
3 * custom.texi (Terminal Init):
4 Replace term-setup-hook with tty-setup-hook.
5
12014-02-23 Glenn Morris <rgm@gnu.org> 62014-02-23 Glenn Morris <rgm@gnu.org>
2 7
3 * rmail.texi (Rmail Inbox): Mention rmail-mbox-format. 8 * rmail.texi (Rmail Inbox): Mention rmail-mbox-format.
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 781d58f193d..deaeb913b75 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -2474,8 +2474,8 @@ variable @code{term-file-prefix} and the terminal type. Your @file{.emacs}
2474file can prevent the loading of the terminal-specific library by setting 2474file can prevent the loading of the terminal-specific library by setting
2475@code{term-file-prefix} to @code{nil}. 2475@code{term-file-prefix} to @code{nil}.
2476 2476
2477@vindex term-setup-hook 2477@vindex tty-setup-hook
2478 Emacs runs the hook @code{term-setup-hook} at the end of 2478 Emacs runs the hook @code{tty-setup-hook} at the end of
2479initialization, after both your @file{.emacs} file and any 2479initialization, after both your @file{.emacs} file and any
2480terminal-specific library have been read in. Add hook functions to this 2480terminal-specific library have been read in. Add hook functions to this
2481hook if you wish to override part of any of the terminal-specific 2481hook if you wish to override part of any of the terminal-specific
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index fe00e5a7b53..6a105a03b3b 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,12 @@
12014-02-25 Glenn Morris <rgm@gnu.org>
2
3 * display.texi (Window Systems):
4 Replace term-setup-hook with emacs-startup-hook.
5 * hooks.texi (Standard Hooks):
6 Replace term-setup-hook with tty-setup-hook.
7 * os.texi (Startup Summary, Init File, Terminal-Specific):
8 Replace term-setup-hook with tty-setup-hook, and update.
9
12014-02-22 Stefan Monnier <monnier@iro.umontreal.ca> 102014-02-22 Stefan Monnier <monnier@iro.umontreal.ca>
2 11
3 * functions.texi (Declare Form): Document gv-expander, gv-setter, and 12 * functions.texi (Declare Form): Document gv-expander, gv-setter, and
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index c4c2c13d3d2..519d33f5844 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -6378,7 +6378,7 @@ This variable is a normal hook which Emacs runs after handling the
6378initialization files. Emacs runs this hook after it has completed 6378initialization files. Emacs runs this hook after it has completed
6379loading your init file, the default initialization file (if 6379loading your init file, the default initialization file (if
6380any), and the terminal-specific Lisp code, and running the hook 6380any), and the terminal-specific Lisp code, and running the hook
6381@code{term-setup-hook}. 6381@code{emacs-startup-hook}.
6382 6382
6383This hook is used for internal purposes: setting up communication with 6383This hook is used for internal purposes: setting up communication with
6384the window system, and creating the initial window. Users should not 6384the window system, and creating the initial window. Users should not
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index 22061fe9931..c28fe2d5f5b 100644
--- a/doc/lispref/hooks.texi
+++ b/doc/lispref/hooks.texi
@@ -1,7 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1993, 1998, 2001-2014 Free Software Foundation, 3@c Copyright (C) 1990-1993, 1998, 2001-2014 Free Software Foundation, Inc.
4@c Inc.
5@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
6@node Standard Hooks 5@node Standard Hooks
7@appendix Standard Hooks 6@appendix Standard Hooks
@@ -213,7 +212,7 @@ Hook run when about to switch windows with a mouse command.
213@itemx temp-buffer-show-hook 212@itemx temp-buffer-show-hook
214@xref{Temporary Displays}. 213@xref{Temporary Displays}.
215 214
216@item term-setup-hook 215@item tty-setup-hook
217@xref{Terminal-Specific}. 216@xref{Terminal-Specific}.
218 217
219@item window-configuration-change-hook 218@item window-configuration-change-hook
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index cff0b2b15c5..dda139b8d74 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -175,8 +175,8 @@ If the buffer @file{*scratch*} exists and is still in Fundamental mode
175 175
176@item 176@item
177If started on a text terminal, it loads the terminal-specific 177If started on a text terminal, it loads the terminal-specific
178Lisp library, which is specified by the variable 178Lisp library (@pxref{Terminal-Specific}), and runs the hook
179@code{term-file-prefix} (@pxref{Terminal-Specific}). This is not done 179@code{tty-setup-hook}. This is not done
180in @code{--batch} mode, nor if @code{term-file-prefix} is @code{nil}. 180in @code{--batch} mode, nor if @code{term-file-prefix} is @code{nil}.
181 181
182@c Now command-line calls command-line-1. 182@c Now command-line calls command-line-1.
@@ -210,7 +210,7 @@ empty, it inserts @code{initial-scratch-message} into that buffer.
210@c daemon/session restore step? 210@c daemon/session restore step?
211 211
212@item 212@item
213It runs @code{emacs-startup-hook} and then @code{term-setup-hook}. 213It runs @code{emacs-startup-hook}.
214 214
215@item 215@item
216It calls @code{frame-notice-user-settings}, which modifies the 216It calls @code{frame-notice-user-settings}, which modifies the
@@ -408,8 +408,7 @@ terminal) and processing the command-line action arguments.
408 408
409@defvar emacs-startup-hook 409@defvar emacs-startup-hook
410This normal hook is run, once, just after handling the command line 410This normal hook is run, once, just after handling the command line
411arguments, just before @code{term-setup-hook}. In batch mode, Emacs 411arguments. In batch mode, Emacs does not run this hook.
412does not run either of these hooks.
413@end defvar 412@end defvar
414 413
415@defvar user-init-file 414@defvar user-init-file
@@ -440,12 +439,12 @@ trying the @samp{.elc} and @samp{.el} suffixes.
440 The usual role of a terminal-specific library is to enable special 439 The usual role of a terminal-specific library is to enable special
441keys to send sequences that Emacs can recognize. It may also need to 440keys to send sequences that Emacs can recognize. It may also need to
442set or add to @code{input-decode-map} if the Termcap or Terminfo entry 441set or add to @code{input-decode-map} if the Termcap or Terminfo entry
443does not specify all the terminal's function keys. @xref{Terminal 442does not specify all the terminal's function keys. @xref{Terminal Input}.
444Input}.
445 443
446 When the name of the terminal type contains a hyphen or underscore, and no library 444 When the name of the terminal type contains a hyphen or underscore,
447is found whose name is identical to the terminal's name, Emacs strips 445and no library is found whose name is identical to the terminal's
448from the terminal's name the last hyphen or underscore and everything that follows 446name, Emacs strips from the terminal's name the last hyphen or
447underscore and everything that follows
449it, and tries again. This process is repeated until Emacs finds a 448it, and tries again. This process is repeated until Emacs finds a
450matching library, or until there are no more hyphens or underscores in the name 449matching library, or until there are no more hyphens or underscores in the name
451(i.e., there is no terminal-specific library). For example, if the 450(i.e., there is no terminal-specific library). For example, if the
@@ -454,17 +453,13 @@ terminal name is @samp{xterm-256color} and there is no
454@file{term/xterm.el}. If necessary, the terminal library can evaluate 453@file{term/xterm.el}. If necessary, the terminal library can evaluate
455@code{(getenv "TERM")} to find the full name of the terminal type. 454@code{(getenv "TERM")} to find the full name of the terminal type.
456 455
457 Your init file can prevent the loading of the 456 Your init file can prevent the loading of the terminal-specific
458terminal-specific library by setting the variable 457library by setting the variable @code{term-file-prefix} to @code{nil}.
459@code{term-file-prefix} to @code{nil}. This feature is useful when
460experimenting with your own peculiar customizations.
461 458
462 You can also arrange to override some of the actions of the 459 You can also arrange to override some of the actions of the
463terminal-specific library by setting the variable 460terminal-specific library by using @code{tty-setup-hook}. This is
464@code{term-setup-hook}. This is a normal hook that Emacs runs 461a normal hook that Emacs runs after initializing a new text terminal.
465at the end of its initialization, after loading both 462You could use this hook to define initializations for terminals that do not
466your init file and any terminal-specific libraries. You could
467use this hook to define initializations for terminals that do not
468have their own libraries. @xref{Hooks}. 463have their own libraries. @xref{Hooks}.
469 464
470@defvar term-file-prefix 465@defvar term-file-prefix
@@ -484,13 +479,13 @@ terminal-initialization file.
484On MS-DOS, Emacs sets the @env{TERM} environment variable to @samp{internal}. 479On MS-DOS, Emacs sets the @env{TERM} environment variable to @samp{internal}.
485@end defvar 480@end defvar
486 481
487@defvar term-setup-hook 482@defvar tty-setup-hook
488This variable is a normal hook that Emacs runs after loading your 483This variable is a normal hook that Emacs runs after initializing a
489init file, the default initialization file (if any) and the 484new text terminal. (This applies when Emacs starts up in non-windowed
490terminal-specific Lisp file. 485mode, and when making a tty @command{emacsclient} connection.) The
491 486hook runs after loading your init file (if applicable) and the
492You can use @code{term-setup-hook} to override the definitions made by a 487terminal-specific Lisp file, so you can use it to adjust the
493terminal-specific file. 488definitions made by that file.
494 489
495For a related feature, @pxref{Window Systems, window-setup-hook}. 490For a related feature, @pxref{Window Systems, window-setup-hook}.
496@end defvar 491@end defvar
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 39ae01e86ec..f017e9479a4 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,5 +1,10 @@
12014-02-25 Glenn Morris <rgm@gnu.org> 12014-02-25 Glenn Morris <rgm@gnu.org>
2 2
3 * edt.texi (Quick start, Starting emulation): Update hook details.
4 * efaq.texi (Fullscreen mode on MS-Windows)
5 (Terminal setup code works after Emacs has begun): Update hook details.
6 * vip.texi (Loading VIP): Fix hook example.
7
3 * efaq-w32.texi (Bash): Don't use setq with hooks. 8 * efaq-w32.texi (Bash): Don't use setq with hooks.
4 9
52014-02-24 Paul Eggert <eggert@cs.ucla.edu> 102014-02-24 Paul Eggert <eggert@cs.ucla.edu>
diff --git a/doc/misc/edt.texi b/doc/misc/edt.texi
index c4937d4ae6e..ef27d339e9e 100644
--- a/doc/misc/edt.texi
+++ b/doc/misc/edt.texi
@@ -91,7 +91,7 @@ initiate an Emacs session, by adding the following line to your
91@file{.emacs} file: 91@file{.emacs} file:
92 92
93@example 93@example
94(add-hook term-setup-hook 'edt-emulation-on) 94(add-hook 'emacs-startup-hook 'edt-emulation-on)
95@end example 95@end example
96 96
97@noindent @strong{Important:} Be sure to read the rest of this manual. 97@noindent @strong{Important:} Be sure to read the rest of this manual.
@@ -295,7 +295,7 @@ initiate an Emacs session, by adding the following line to your
295@file{.emacs} file: 295@file{.emacs} file:
296 296
297@example 297@example
298(add-hook term-setup-hook 'edt-emulation-on) 298(add-hook 'emacs-startup-hook 'edt-emulation-on)
299@end example 299@end example
300 300
301A reference sheet is included (later on) listing the default EDT 301A reference sheet is included (later on) listing the default EDT
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index a13d3df43f1..ca9e24fbeaa 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -2684,8 +2684,8 @@ Use the function @code{w32-send-sys-command}. For example, you can
2684put the following in your @file{.emacs} file: 2684put the following in your @file{.emacs} file:
2685 2685
2686@lisp 2686@lisp
2687(add-hook 'term-setup-hook 2687(add-hook 'emacs-startup-hook
2688 #'(lambda () (w32-send-sys-command ?\xF030))) 2688 (lambda () (w32-send-sys-command ?\xF030)))
2689@end lisp 2689@end lisp
2690 2690
2691To avoid the slightly distracting visual effect of Emacs starting with 2691To avoid the slightly distracting visual effect of Emacs starting with
@@ -3594,12 +3594,12 @@ been executed but is not, then you will experience this problem (this
3594code/file execution order is not enforced after startup). 3594code/file execution order is not enforced after startup).
3595 3595
3596To postpone the execution of Emacs Lisp code until after terminal or 3596To postpone the execution of Emacs Lisp code until after terminal or
3597window-system setup, treat the code as a @dfn{lambda list} and set the 3597window-system setup, treat the code as a @dfn{lambda list} and add it to
3598value of either the @code{term-setup-hook} or @code{window-setup-hook} 3598@code{emacs-startup-hook} (or @code{tty-setup-hook} in Emacs 24.4 and
3599variable to this lambda function. For example, 3599newer). For example,
3600 3600
3601@lisp 3601@lisp
3602(add-hook 'term-setup-hook 3602(add-hook 'emacs-startup-hook
3603 (lambda () 3603 (lambda ()
3604 (when (string-match "\\`vt220" (or (getenv "TERM") "")) 3604 (when (string-match "\\`vt220" (or (getenv "TERM") ""))
3605 ;; Make vt220's "Do" key behave like M-x: 3605 ;; Make vt220's "Do" key behave like M-x:
diff --git a/doc/misc/vip.texi b/doc/misc/vip.texi
index 367ed2adb4c..90dc3cd8dec 100644
--- a/doc/misc/vip.texi
+++ b/doc/misc/vip.texi
@@ -165,7 +165,7 @@ directory and it will be executed every time you invoke Emacs. If you wish
165to be in vi mode whenever Emacs starts up, you can include the following 165to be in vi mode whenever Emacs starts up, you can include the following
166line in your @file{.emacs} file instead of the above line: 166line in your @file{.emacs} file instead of the above line:
167@example 167@example
168(setq term-setup-hook 'vip-mode) 168(add-hook 'emacs-startup-hook 'vip-mode)
169@end example 169@end example
170@noindent 170@noindent
171(@xref{Vi Mode}, for the explanation of vi mode.) 171(@xref{Vi Mode}, for the explanation of vi mode.)
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 62f00d05aca..6f419c346c6 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,7 @@
12014-02-25 Glenn Morris <rgm@gnu.org>
2
3 * refcards/vipcard.tex: Hook fix.
4
12014-02-23 Juanma Barranquero <lekktu@gmail.com> 52014-02-23 Juanma Barranquero <lekktu@gmail.com>
2 6
3 * NEWS: Fix references to ?« and ?» that got mangled somehow. 7 * NEWS: Fix references to ?« and ?» that got mangled somehow.
diff --git a/etc/NEWS b/etc/NEWS
index f7a36c51fc2..5a3bf58976f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1202,7 +1202,12 @@ The function `display-popup-menus-p' will now return non-nil for a
1202display or frame whenever a mouse is supported on that display or 1202display or frame whenever a mouse is supported on that display or
1203frame. 1203frame.
1204 1204
1205*** New hook `tty-setup-hook'. 1205+++
1206*** New hook `tty-setup-hook', run at the end of initializing a text terminal.
1207
1208+++
1209*** The hook `term-setup-hook' is obsolete. It is entirely equivalent
1210to `emacs-startup-hook'. See also the new `tty-setup-hook'.
1206 1211
1207** Window Handling 1212** Window Handling
1208 1213
diff --git a/etc/refcards/vipcard.tex b/etc/refcards/vipcard.tex
index deb42a7f34f..23f263202a7 100644
--- a/etc/refcards/vipcard.tex
+++ b/etc/refcards/vipcard.tex
@@ -279,7 +279,7 @@ If you wish to be in vi mode just after you startup Emacs,
279include the line: 279include the line:
280 280
281\hskip 5ex 281\hskip 5ex
282\kbd{(setq term-setup-hook 'vip-mode)} 282\kbd{(add-hook 'emacs-startup-hook 'vip-mode)}
283 283
284in your \kbd{.emacs} file. 284in your \kbd{.emacs} file.
285Or, you can put the following alias in your \kbd{.cshrc} file. 285Or, you can put the following alias in your \kbd{.cshrc} file.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 69434453c85..67256c588e7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12014-02-25 Glenn Morris <rgm@gnu.org>
2
3 * faces.el (tty-setup-hook, tty-run-terminal-initialization): Doc fixes.
4 * startup.el (term-setup-hook): Doc fix. Make obsolete.
5 * term/sun.el (sun-raw-prefix-hooks):
6 Use tty-setup-hook instead of term-setup-hook.
7 (terminal-init-sun): Construct message from bytecomp plist.
8 * term/wyse50.el (enable-arrow-keys): Doc fix.
9
12014-02-24 Juanma Barranquero <lekktu@gmail.com> 102014-02-24 Juanma Barranquero <lekktu@gmail.com>
2 11
3 * term/sun.el (kill-region-and-unmark, sun-raw-prefix-hooks): 12 * term/sun.el (kill-region-and-unmark, sun-raw-prefix-hooks):
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el
index 57185053932..a32fb612adb 100644
--- a/lisp/emulation/edt.el
+++ b/lisp/emulation/edt.el
@@ -1,7 +1,6 @@
1;;; edt.el --- enhanced EDT keypad mode emulation for GNU Emacs 1;;; edt.el --- enhanced EDT keypad mode emulation for GNU Emacs
2 2
3;; Copyright (C) 1986, 1992-1995, 2000-2014 Free Software Foundation, 3;; Copyright (C) 1986, 1992-1995, 2000-2014 Free Software Foundation, Inc.
4;; Inc.
5 4
6;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com> 5;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com>
7;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com> 6;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com>
@@ -51,7 +50,7 @@
51;; you initiate a GNU Emacs session, by adding the following line to 50;; you initiate a GNU Emacs session, by adding the following line to
52;; your init file: 51;; your init file:
53;; 52;;
54;; (add-hook term-setup-hook 'edt-emulation-on) 53;; (add-hook 'emacs-startup-hook 'edt-emulation-on)
55 54
56;; IMPORTANT: Be sure to read the Info node `edt' for more details. 55;; IMPORTANT: Be sure to read the Info node `edt' for more details.
57;; It contains very helpful user information. 56;; It contains very helpful user information.
diff --git a/lisp/faces.el b/lisp/faces.el
index 3394c721f04..985355ade09 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2107,12 +2107,16 @@ the above example."
2107 2107
2108(defvar tty-setup-hook nil 2108(defvar tty-setup-hook nil
2109 "Hook run after running the initialization function of a new text terminal. 2109 "Hook run after running the initialization function of a new text terminal.
2110Specifically, `tty-run-terminal-initialization' runs this.
2110This 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.")
2111 2112
2112(defun tty-run-terminal-initialization (frame &optional type) 2113(defun tty-run-terminal-initialization (frame &optional type)
2113 "Run the special initialization code for the terminal type of FRAME. 2114 "Run the special initialization code for the terminal type of FRAME.
2114The optional TYPE parameter may be used to override the autodetected 2115The optional TYPE parameter may be used to override the autodetected
2115terminal type to a different value." 2116terminal type to a different value. As a final step, this runs the
2117hook `tty-setup-hook'.
2118
2119If you set `term-file-prefix' to nil, this function does nothing."
2116 (setq type (or type (tty-type frame))) 2120 (setq type (or type (tty-type frame)))
2117 ;; Load library for our terminal type. 2121 ;; Load library for our terminal type.
2118 ;; User init file can set term-file-prefix to nil to prevent this. 2122 ;; User init file can set term-file-prefix to nil to prevent this.
diff --git a/lisp/startup.el b/lisp/startup.el
index b3f2316729b..9c9f23ba9a6 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1,7 +1,6 @@
1;;; startup.el --- process Emacs shell arguments -*- lexical-binding: t -*- 1;;; startup.el --- process Emacs shell arguments -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 1985-1986, 1992, 1994-2014 Free Software Foundation, 3;; Copyright (C) 1985-1986, 1992, 1994-2014 Free Software Foundation, Inc.
4;; Inc.
5 4
6;; Maintainer: emacs-devel@gnu.org 5;; Maintainer: emacs-devel@gnu.org
7;; Keywords: internal 6;; Keywords: internal
@@ -282,10 +281,15 @@ these functions will invoke the debugger.")
282 "Normal hook run after loading init files and handling the command line.") 281 "Normal hook run after loading init files and handling the command line.")
283 282
284(defvar term-setup-hook nil 283(defvar term-setup-hook nil
285 "Normal hook run after loading terminal-specific Lisp code. 284 "Normal hook run immediately after `emacs-startup-hook'.
286It also follows `emacs-startup-hook'. This hook exists for users to set, 285In new code, there is no reason to use this instead of `emacs-startup-hook'.
287so as to override the definitions made by the terminal-specific file. 286If you want to execute terminal-specific Lisp code, for example
288Emacs never sets this variable itself.") 287to override the definitions made by the terminal-specific file,
288see `tty-setup-hook'.")
289
290(make-obsolete-variable 'term-setup-hook
291 "use either `emacs-startup-hook' or \
292`tty-setup-hook' instead." "24.4")
289 293
290(defvar inhibit-startup-hooks nil 294(defvar inhibit-startup-hooks nil
291 "Non-nil means don't run `term-setup-hook' and `emacs-startup-hook'. 295 "Non-nil means don't run `term-setup-hook' and `emacs-startup-hook'.
diff --git a/lisp/term/sun.el b/lisp/term/sun.el
index c2a913ad345..b3af959c30e 100644
--- a/lisp/term/sun.el
+++ b/lisp/term/sun.el
@@ -123,7 +123,8 @@
123 123
124(defvar sun-raw-prefix-hooks nil 124(defvar sun-raw-prefix-hooks nil
125 "List of forms to evaluate after setting `sun-raw-prefix'.") 125 "List of forms to evaluate after setting `sun-raw-prefix'.")
126(make-obsolete-variable 'sun-raw-prefix-hooks 'term-setup-hook "21.1") 126;; Obsolete since 21.1, but tty-setup-hook only exists since 24.4.
127(make-obsolete-variable 'sun-raw-prefix-hooks 'tty-setup-hook "21.1")
127 128
128 129
129 130
@@ -149,7 +150,9 @@
149 (global-set-key [f7] 'enlarge-window) 150 (global-set-key [f7] 'enlarge-window)
150 151
151 (when sun-raw-prefix-hooks 152 (when sun-raw-prefix-hooks
152 (message "sun-raw-prefix-hooks is obsolete! Use term-setup-hook instead!") 153 (message "sun-raw-prefix-hooks is obsolete! Use %s instead!"
154 (or (car-safe (get 'sun-raw-prefix-hooks 'byte-obsolete-variable))
155 "emacs-startup-hook"))
153 (let ((hooks sun-raw-prefix-hooks)) 156 (let ((hooks sun-raw-prefix-hooks))
154 (while hooks 157 (while hooks
155 (eval (car hooks)) 158 (eval (car hooks))
diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el
index a894801f985..aa9ba43d3d7 100644
--- a/lisp/term/wyse50.el
+++ b/lisp/term/wyse50.el
@@ -1,7 +1,6 @@
1;;; wyse50.el --- terminal support code for Wyse 50 1;;; wyse50.el --- terminal support code for Wyse 50
2 2
3;; Copyright (C) 1989, 1993-1994, 2001-2014 Free Software Foundation, 3;; Copyright (C) 1989, 1993-1994, 2001-2014 Free Software Foundation, Inc.
4;; Inc.
5 4
6;; Author: Daniel Pfeiffer <occitan@esperanto.org>, 5;; Author: Daniel Pfeiffer <occitan@esperanto.org>,
7;; Jim Blandy <jimb@occs.cs.oberlin.edu> 6;; Jim Blandy <jimb@occs.cs.oberlin.edu>
@@ -132,7 +131,7 @@
132 (concat "\ea23R" (1+ (frame-width)) "C\eG0")))))) 131 (concat "\ea23R" (1+ (frame-width)) "C\eG0"))))))
133 132
134(defun enable-arrow-keys () 133(defun enable-arrow-keys ()
135 "To be called by `term-setup-hook'. Overrides 6 Emacs standard keys 134 "To be called by `tty-setup-hook'. Overrides 6 Emacs standard keys
136whose functions are then typed as follows: 135whose functions are then typed as follows:
137C-a Funct Left-arrow 136C-a Funct Left-arrow
138C-h M-? 137C-h M-?