diff options
| author | Glenn Morris | 2014-02-25 00:41:47 -0800 |
|---|---|---|
| committer | Glenn Morris | 2014-02-25 00:41:47 -0800 |
| commit | 98bd6b321c3efbb5d7c5d3c0dbbcecbccf5fda3f (patch) | |
| tree | 360d2816c6a875d5920a1f26c01cc4de437c38b1 /doc | |
| parent | a038bd8769ec54ecf7d7241ccef8decc0dc712b5 (diff) | |
| download | emacs-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.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/emacs/custom.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 9 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/hooks.texi | 5 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 47 | ||||
| -rw-r--r-- | doc/misc/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/misc/edt.texi | 4 | ||||
| -rw-r--r-- | doc/misc/efaq.texi | 12 | ||||
| -rw-r--r-- | doc/misc/vip.texi | 2 |
10 files changed, 54 insertions, 41 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 @@ | |||
| 1 | 2014-02-25 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * custom.texi (Terminal Init): | ||
| 4 | Replace term-setup-hook with tty-setup-hook. | ||
| 5 | |||
| 1 | 2014-02-23 Glenn Morris <rgm@gnu.org> | 6 | 2014-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} | |||
| 2474 | file can prevent the loading of the terminal-specific library by setting | 2474 | file 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 |
| 2479 | initialization, after both your @file{.emacs} file and any | 2479 | initialization, after both your @file{.emacs} file and any |
| 2480 | terminal-specific library have been read in. Add hook functions to this | 2480 | terminal-specific library have been read in. Add hook functions to this |
| 2481 | hook if you wish to override part of any of the terminal-specific | 2481 | hook 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 @@ | |||
| 1 | 2014-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 | |||
| 1 | 2014-02-22 Stefan Monnier <monnier@iro.umontreal.ca> | 10 | 2014-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 | |||
| 6378 | initialization files. Emacs runs this hook after it has completed | 6378 | initialization files. Emacs runs this hook after it has completed |
| 6379 | loading your init file, the default initialization file (if | 6379 | loading your init file, the default initialization file (if |
| 6380 | any), and the terminal-specific Lisp code, and running the hook | 6380 | any), and the terminal-specific Lisp code, and running the hook |
| 6381 | @code{term-setup-hook}. | 6381 | @code{emacs-startup-hook}. |
| 6382 | 6382 | ||
| 6383 | This hook is used for internal purposes: setting up communication with | 6383 | This hook is used for internal purposes: setting up communication with |
| 6384 | the window system, and creating the initial window. Users should not | 6384 | the 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 |
| 177 | If started on a text terminal, it loads the terminal-specific | 177 | If started on a text terminal, it loads the terminal-specific |
| 178 | Lisp library, which is specified by the variable | 178 | Lisp 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 |
| 180 | in @code{--batch} mode, nor if @code{term-file-prefix} is @code{nil}. | 180 | in @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 |
| 213 | It runs @code{emacs-startup-hook} and then @code{term-setup-hook}. | 213 | It runs @code{emacs-startup-hook}. |
| 214 | 214 | ||
| 215 | @item | 215 | @item |
| 216 | It calls @code{frame-notice-user-settings}, which modifies the | 216 | It 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 |
| 410 | This normal hook is run, once, just after handling the command line | 410 | This normal hook is run, once, just after handling the command line |
| 411 | arguments, just before @code{term-setup-hook}. In batch mode, Emacs | 411 | arguments. In batch mode, Emacs does not run this hook. |
| 412 | does 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 |
| 441 | keys to send sequences that Emacs can recognize. It may also need to | 440 | keys to send sequences that Emacs can recognize. It may also need to |
| 442 | set or add to @code{input-decode-map} if the Termcap or Terminfo entry | 441 | set or add to @code{input-decode-map} if the Termcap or Terminfo entry |
| 443 | does not specify all the terminal's function keys. @xref{Terminal | 442 | does not specify all the terminal's function keys. @xref{Terminal Input}. |
| 444 | Input}. | ||
| 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, |
| 447 | is found whose name is identical to the terminal's name, Emacs strips | 445 | and no library is found whose name is identical to the terminal's |
| 448 | from the terminal's name the last hyphen or underscore and everything that follows | 446 | name, Emacs strips from the terminal's name the last hyphen or |
| 447 | underscore and everything that follows | ||
| 449 | it, and tries again. This process is repeated until Emacs finds a | 448 | it, and tries again. This process is repeated until Emacs finds a |
| 450 | matching library, or until there are no more hyphens or underscores in the name | 449 | matching 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 |
| 458 | terminal-specific library by setting the variable | 457 | library by setting the variable @code{term-file-prefix} to @code{nil}. |
| 459 | @code{term-file-prefix} to @code{nil}. This feature is useful when | ||
| 460 | experimenting 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 |
| 463 | terminal-specific library by setting the variable | 460 | terminal-specific library by using @code{tty-setup-hook}. This is |
| 464 | @code{term-setup-hook}. This is a normal hook that Emacs runs | 461 | a normal hook that Emacs runs after initializing a new text terminal. |
| 465 | at the end of its initialization, after loading both | 462 | You could use this hook to define initializations for terminals that do not |
| 466 | your init file and any terminal-specific libraries. You could | ||
| 467 | use this hook to define initializations for terminals that do not | ||
| 468 | have their own libraries. @xref{Hooks}. | 463 | have their own libraries. @xref{Hooks}. |
| 469 | 464 | ||
| 470 | @defvar term-file-prefix | 465 | @defvar term-file-prefix |
| @@ -484,13 +479,13 @@ terminal-initialization file. | |||
| 484 | On MS-DOS, Emacs sets the @env{TERM} environment variable to @samp{internal}. | 479 | On 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 |
| 488 | This variable is a normal hook that Emacs runs after loading your | 483 | This variable is a normal hook that Emacs runs after initializing a |
| 489 | init file, the default initialization file (if any) and the | 484 | new text terminal. (This applies when Emacs starts up in non-windowed |
| 490 | terminal-specific Lisp file. | 485 | mode, and when making a tty @command{emacsclient} connection.) The |
| 491 | 486 | hook runs after loading your init file (if applicable) and the | |
| 492 | You can use @code{term-setup-hook} to override the definitions made by a | 487 | terminal-specific Lisp file, so you can use it to adjust the |
| 493 | terminal-specific file. | 488 | definitions made by that file. |
| 494 | 489 | ||
| 495 | For a related feature, @pxref{Window Systems, window-setup-hook}. | 490 | For 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 @@ | |||
| 1 | 2014-02-25 Glenn Morris <rgm@gnu.org> | 1 | 2014-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 | ||
| 5 | 2014-02-24 Paul Eggert <eggert@cs.ucla.edu> | 10 | 2014-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 | ||
| 301 | A reference sheet is included (later on) listing the default EDT | 301 | A 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 | |||
| 2684 | put the following in your @file{.emacs} file: | 2684 | put 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 | ||
| 2691 | To avoid the slightly distracting visual effect of Emacs starting with | 2691 | To 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 | |||
| 3594 | code/file execution order is not enforced after startup). | 3594 | code/file execution order is not enforced after startup). |
| 3595 | 3595 | ||
| 3596 | To postpone the execution of Emacs Lisp code until after terminal or | 3596 | To postpone the execution of Emacs Lisp code until after terminal or |
| 3597 | window-system setup, treat the code as a @dfn{lambda list} and set the | 3597 | window-system setup, treat the code as a @dfn{lambda list} and add it to |
| 3598 | value 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 |
| 3599 | variable to this lambda function. For example, | 3599 | newer). 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 | |||
| 165 | to be in vi mode whenever Emacs starts up, you can include the following | 165 | to be in vi mode whenever Emacs starts up, you can include the following |
| 166 | line in your @file{.emacs} file instead of the above line: | 166 | line 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.) |