emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r116551: Doc updates related to tty-setup-hook


From: Glenn Morris
Subject: [Emacs-diffs] trunk r116551: Doc updates related to tty-setup-hook
Date: Tue, 25 Feb 2014 08:42:13 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116551
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2014-02-25 00:41:47 -0800
message:
  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.
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/display.texi       
display.texi-20091113204419-o5vbwnq5f7feedwu-6172
  doc/lispref/hooks.texi         hooks.texi-20091113204419-o5vbwnq5f7feedwu-6186
  doc/lispref/os.texi            os.texi-20091113204419-o5vbwnq5f7feedwu-6205
  doc/misc/ChangeLog             changelog-20091113204419-o5vbwnq5f7feedwu-6331
  doc/misc/edt.texi              edt.texi-20091215194433-gyppc2fi66nhko62-2
  doc/misc/efaq.texi             faq.texi-20091113204419-o5vbwnq5f7feedwu-6301
  doc/misc/vip.texi              vip.texi-20091113204419-o5vbwnq5f7feedwu-6327
  etc/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1485
  etc/NEWS                       news-20100311060928-aoit31wvzf25yr1z-1
  etc/refcards/vipcard.tex       
vipcard.tex-20091113204419-o5vbwnq5f7feedwu-5160
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emulation/edt.el          edt.el-20091113204419-o5vbwnq5f7feedwu-116
  lisp/faces.el                  faces.el-20091113204419-o5vbwnq5f7feedwu-562
  lisp/startup.el                startup.el-20091113204419-o5vbwnq5f7feedwu-260
  lisp/term/sun.el               sun.el-20091113204419-o5vbwnq5f7feedwu-393
  lisp/term/wyse50.el            wyse50.el-20091113204419-o5vbwnq5f7feedwu-182
=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog       2014-02-23 19:23:12 +0000
+++ b/doc/emacs/ChangeLog       2014-02-25 08:41:47 +0000
@@ -1,3 +1,8 @@
+2014-02-25  Glenn Morris  <address@hidden>
+
+       * custom.texi (Terminal Init):
+       Replace term-setup-hook with tty-setup-hook.
+
 2014-02-23  Glenn Morris  <address@hidden>
 
        * rmail.texi (Rmail Inbox): Mention rmail-mbox-format.

=== modified file 'doc/emacs/custom.texi'
--- a/doc/emacs/custom.texi     2014-01-01 07:43:34 +0000
+++ b/doc/emacs/custom.texi     2014-02-25 08:41:47 +0000
@@ -2474,8 +2474,8 @@
 file can prevent the loading of the terminal-specific library by setting
 @code{term-file-prefix} to @code{nil}.
 
address@hidden term-setup-hook
-  Emacs runs the hook @code{term-setup-hook} at the end of
address@hidden tty-setup-hook
+  Emacs runs the hook @code{tty-setup-hook} at the end of
 initialization, after both your @file{.emacs} file and any
 terminal-specific library have been read in.  Add hook functions to this
 hook if you wish to override part of any of the terminal-specific

=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2014-02-22 03:39:10 +0000
+++ b/doc/lispref/ChangeLog     2014-02-25 08:41:47 +0000
@@ -1,3 +1,12 @@
+2014-02-25  Glenn Morris  <address@hidden>
+
+       * display.texi (Window Systems):
+       Replace term-setup-hook with emacs-startup-hook.
+       * hooks.texi (Standard Hooks):
+       Replace term-setup-hook with tty-setup-hook.
+       * os.texi (Startup Summary, Init File, Terminal-Specific):
+       Replace term-setup-hook with tty-setup-hook, and update.
+
 2014-02-22  Stefan Monnier  <address@hidden>
 
        * functions.texi (Declare Form): Document gv-expander, gv-setter, and

=== modified file 'doc/lispref/display.texi'
--- a/doc/lispref/display.texi  2014-02-09 05:20:54 +0000
+++ b/doc/lispref/display.texi  2014-02-25 08:41:47 +0000
@@ -6378,7 +6378,7 @@
 initialization files.  Emacs runs this hook after it has completed
 loading your init file, the default initialization file (if
 any), and the terminal-specific Lisp code, and running the hook
address@hidden
address@hidden
 
 This hook is used for internal purposes: setting up communication with
 the window system, and creating the initial window.  Users should not

=== modified file 'doc/lispref/hooks.texi'
--- a/doc/lispref/hooks.texi    2014-01-01 07:43:34 +0000
+++ b/doc/lispref/hooks.texi    2014-02-25 08:41:47 +0000
@@ -1,7 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
address@hidden Copyright (C) 1990-1993, 1998, 2001-2014 Free Software 
Foundation,
address@hidden Inc.
address@hidden Copyright (C) 1990-1993, 1998, 2001-2014 Free Software 
Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @node Standard Hooks
 @appendix Standard Hooks
@@ -213,7 +212,7 @@
 @itemx temp-buffer-show-hook
 @xref{Temporary Displays}.
 
address@hidden term-setup-hook
address@hidden tty-setup-hook
 @xref{Terminal-Specific}.
 
 @item window-configuration-change-hook

=== modified file 'doc/lispref/os.texi'
--- a/doc/lispref/os.texi       2014-01-01 07:43:34 +0000
+++ b/doc/lispref/os.texi       2014-02-25 08:41:47 +0000
@@ -175,8 +175,8 @@
 
 @item
 If started on a text terminal, it loads the terminal-specific
-Lisp library, which is specified by the variable
address@hidden (@pxref{Terminal-Specific}).  This is not done
+Lisp library (@pxref{Terminal-Specific}), and runs the hook
address@hidden  This is not done
 in @code{--batch} mode, nor if @code{term-file-prefix} is @code{nil}.
 
 @c Now command-line calls command-line-1.
@@ -210,7 +210,7 @@
 @c daemon/session restore step?
 
 @item
-It runs @code{emacs-startup-hook} and then @code{term-setup-hook}.
+It runs @code{emacs-startup-hook}.
 
 @item
 It calls @code{frame-notice-user-settings}, which modifies the
@@ -408,8 +408,7 @@
 
 @defvar emacs-startup-hook
 This normal hook is run, once, just after handling the command line
-arguments, just before @code{term-setup-hook}.  In batch mode, Emacs
-does not run either of these hooks.
+arguments.  In batch mode, Emacs does not run this hook.
 @end defvar
 
 @defvar user-init-file
@@ -440,12 +439,12 @@
   The usual role of a terminal-specific library is to enable special
 keys to send sequences that Emacs can recognize.  It may also need to
 set or add to @code{input-decode-map} if the Termcap or Terminfo entry
-does not specify all the terminal's function keys.  @xref{Terminal
-Input}.
+does not specify all the terminal's function keys.  @xref{Terminal Input}.
 
-  When the name of the terminal type contains a hyphen or underscore, and no 
library
-is found whose name is identical to the terminal's name, Emacs strips
-from the terminal's name the last hyphen or underscore and everything that 
follows
+  When the name of the terminal type contains a hyphen or underscore,
+and no library is found whose name is identical to the terminal's
+name, Emacs strips from the terminal's name the last hyphen or
+underscore and everything that follows
 it, and tries again.  This process is repeated until Emacs finds a
 matching library, or until there are no more hyphens or underscores in the name
 (i.e., there is no terminal-specific library).  For example, if the
@@ -454,17 +453,13 @@
 @file{term/xterm.el}.  If necessary, the terminal library can evaluate
 @code{(getenv "TERM")} to find the full name of the terminal type.
 
-  Your init file can prevent the loading of the
-terminal-specific library by setting the variable
address@hidden to @code{nil}.  This feature is useful when
-experimenting with your own peculiar customizations.
+  Your init file can prevent the loading of the terminal-specific
+library by setting the variable @code{term-file-prefix} to @code{nil}.
 
   You can also arrange to override some of the actions of the
-terminal-specific library by setting the variable
address@hidden  This is a normal hook that Emacs runs
-at the end of its initialization, after loading both
-your init file and any terminal-specific libraries.  You could
-use this hook to define initializations for terminals that do not
+terminal-specific library by using @code{tty-setup-hook}.  This is
+a normal hook that Emacs runs after initializing a new text terminal.
+You could use this hook to define initializations for terminals that do not
 have their own libraries.  @xref{Hooks}.
 
 @defvar term-file-prefix
@@ -484,13 +479,13 @@
 On MS-DOS, Emacs sets the @env{TERM} environment variable to @samp{internal}.
 @end defvar
 
address@hidden term-setup-hook
-This variable is a normal hook that Emacs runs after loading your
-init file, the default initialization file (if any) and the
-terminal-specific Lisp file.
-
-You can use @code{term-setup-hook} to override the definitions made by a
-terminal-specific file.
address@hidden 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
+mode, and when making a tty @command{emacsclient} connection.)  The
+hook runs after loading your init file (if applicable) and the
+terminal-specific Lisp file, so you can use it to adjust the
+definitions made by that file.
 
 For a related feature, @pxref{Window Systems, window-setup-hook}.
 @end defvar

=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog        2014-02-25 03:11:11 +0000
+++ b/doc/misc/ChangeLog        2014-02-25 08:41:47 +0000
@@ -1,5 +1,10 @@
 2014-02-25  Glenn Morris  <address@hidden>
 
+       * edt.texi (Quick start, Starting emulation): Update hook details.
+       * efaq.texi (Fullscreen mode on MS-Windows)
+       (Terminal setup code works after Emacs has begun): Update hook details.
+       * vip.texi (Loading VIP): Fix hook example.
+
        * efaq-w32.texi (Bash): Don't use setq with hooks.
 
 2014-02-24  Paul Eggert  <address@hidden>

=== modified file 'doc/misc/edt.texi'
--- a/doc/misc/edt.texi 2014-01-06 05:25:46 +0000
+++ b/doc/misc/edt.texi 2014-02-25 08:41:47 +0000
@@ -91,7 +91,7 @@
 @file{.emacs} file:
 
 @example
-(add-hook term-setup-hook 'edt-emulation-on)
+(add-hook 'emacs-startup-hook 'edt-emulation-on)
 @end example
 
 @noindent @strong{Important:} Be sure to read the rest of this manual.
@@ -295,7 +295,7 @@
 @file{.emacs} file:
 
 @example
-(add-hook term-setup-hook 'edt-emulation-on)
+(add-hook 'emacs-startup-hook 'edt-emulation-on)
 @end example
 
 A reference sheet is included (later on) listing the default EDT

=== modified file 'doc/misc/efaq.texi'
--- a/doc/misc/efaq.texi        2014-01-31 07:28:17 +0000
+++ b/doc/misc/efaq.texi        2014-02-25 08:41:47 +0000
@@ -2684,8 +2684,8 @@
 put the following in your @file{.emacs} file:
 
 @lisp
-(add-hook 'term-setup-hook
-          #'(lambda () (w32-send-sys-command ?\xF030)))
+(add-hook 'emacs-startup-hook
+          (lambda () (w32-send-sys-command ?\xF030)))
 @end lisp
 
 To avoid the slightly distracting visual effect of Emacs starting with
@@ -3594,12 +3594,12 @@
 code/file execution order is not enforced after startup).
 
 To postpone the execution of Emacs Lisp code until after terminal or
-window-system setup, treat the code as a @dfn{lambda list} and set the
-value of either the @code{term-setup-hook} or @code{window-setup-hook}
-variable to this lambda function.  For example,
+window-system setup, treat the code as a @dfn{lambda list} and add it to
address@hidden (or @code{tty-setup-hook} in Emacs 24.4 and
+newer).  For example,
 
 @lisp
-(add-hook 'term-setup-hook
+(add-hook 'emacs-startup-hook
           (lambda ()
            (when (string-match "\\`vt220" (or (getenv "TERM") ""))
              ;; Make vt220's "Do" key behave like M-x:

=== modified file 'doc/misc/vip.texi'
--- a/doc/misc/vip.texi 2014-01-27 02:02:28 +0000
+++ b/doc/misc/vip.texi 2014-02-25 08:41:47 +0000
@@ -165,7 +165,7 @@
 to be in vi mode whenever Emacs starts up, you can include the following
 line in your @file{.emacs} file instead of the above line:
 @example
-(setq term-setup-hook 'vip-mode)
+(add-hook 'emacs-startup-hook 'vip-mode)
 @end example
 @noindent
 (@xref{Vi Mode}, for the explanation of vi mode.)

=== modified file 'etc/ChangeLog'
--- a/etc/ChangeLog     2014-02-23 19:46:38 +0000
+++ b/etc/ChangeLog     2014-02-25 08:41:47 +0000
@@ -1,3 +1,7 @@
+2014-02-25  Glenn Morris  <address@hidden>
+
+       * refcards/vipcard.tex: Hook fix.
+
 2014-02-23  Juanma Barranquero  <address@hidden>
 
        * NEWS: Fix references to ?« and ?» that got mangled somehow.

=== modified file 'etc/NEWS'
--- a/etc/NEWS  2014-02-23 19:46:38 +0000
+++ b/etc/NEWS  2014-02-25 08:41:47 +0000
@@ -1202,7 +1202,12 @@
 display or frame whenever a mouse is supported on that display or
 frame.
 
-*** New hook `tty-setup-hook'.
++++
+*** New hook `tty-setup-hook', run at the end of initializing a text terminal.
+
++++
+*** The hook `term-setup-hook' is obsolete.  It is entirely equivalent
+to `emacs-startup-hook'.  See also the new `tty-setup-hook'.
 
 ** Window Handling
 

=== modified file 'etc/refcards/vipcard.tex'
--- a/etc/refcards/vipcard.tex  2014-01-01 07:43:34 +0000
+++ b/etc/refcards/vipcard.tex  2014-02-25 08:41:47 +0000
@@ -279,7 +279,7 @@
 include the line:
 
 \hskip 5ex
-\kbd{(setq term-setup-hook 'vip-mode)}
+\kbd{(add-hook 'emacs-startup-hook 'vip-mode)}
 
 in your \kbd{.emacs} file.
 Or, you can put the following alias in your \kbd{.cshrc} file.

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-02-24 17:24:14 +0000
+++ b/lisp/ChangeLog    2014-02-25 08:41:47 +0000
@@ -1,3 +1,12 @@
+2014-02-25  Glenn Morris  <address@hidden>
+
+       * faces.el (tty-setup-hook, tty-run-terminal-initialization): Doc fixes.
+       * startup.el (term-setup-hook): Doc fix.  Make obsolete.
+       * term/sun.el (sun-raw-prefix-hooks):
+       Use tty-setup-hook instead of term-setup-hook.
+       (terminal-init-sun): Construct message from bytecomp plist.
+       * term/wyse50.el (enable-arrow-keys): Doc fix.
+
 2014-02-24  Juanma Barranquero  <address@hidden>
 
        * term/sun.el (kill-region-and-unmark, sun-raw-prefix-hooks):

=== modified file 'lisp/emulation/edt.el'
--- a/lisp/emulation/edt.el     2014-01-01 07:43:34 +0000
+++ b/lisp/emulation/edt.el     2014-02-25 08:41:47 +0000
@@ -1,7 +1,6 @@
 ;;; edt.el --- enhanced EDT keypad mode emulation for GNU Emacs
 
-;; Copyright (C) 1986, 1992-1995, 2000-2014 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1986, 1992-1995, 2000-2014 Free Software Foundation, Inc.
 
 ;; Author: Kevin Gallagher <address@hidden>
 ;; Maintainer: Kevin Gallagher <address@hidden>
@@ -51,7 +50,7 @@
 ;; you initiate a GNU Emacs session, by adding the following line to
 ;; your init file:
 ;;
-;;    (add-hook term-setup-hook 'edt-emulation-on)
+;;    (add-hook 'emacs-startup-hook 'edt-emulation-on)
 
 ;; IMPORTANT: Be sure to read the Info node `edt' for more details.
 ;; It contains very helpful user information.

=== modified file 'lisp/faces.el'
--- a/lisp/faces.el     2014-02-14 06:59:24 +0000
+++ b/lisp/faces.el     2014-02-25 08:41:47 +0000
@@ -2107,12 +2107,16 @@
 
 (defvar tty-setup-hook nil
   "Hook run after running the initialization function of a new text terminal.
+Specifically, `tty-run-terminal-initialization' runs this.
 This can be used to fine tune the `input-decode-map', for example.")
 
 (defun tty-run-terminal-initialization (frame &optional type)
   "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."
+terminal type to a different value.  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)))
   ;; Load library for our terminal type.
   ;; User init file can set term-file-prefix to nil to prevent this.

=== modified file 'lisp/startup.el'
--- a/lisp/startup.el   2014-02-10 01:34:22 +0000
+++ b/lisp/startup.el   2014-02-25 08:41:47 +0000
@@ -1,7 +1,6 @@
 ;;; startup.el --- process Emacs shell arguments  -*- lexical-binding: t -*-
 
-;; Copyright (C) 1985-1986, 1992, 1994-2014 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1985-1986, 1992, 1994-2014 Free Software Foundation, Inc.
 
 ;; Maintainer: address@hidden
 ;; Keywords: internal
@@ -282,10 +281,15 @@
   "Normal hook run after loading init files and handling the command line.")
 
 (defvar term-setup-hook nil
-  "Normal hook run after loading terminal-specific Lisp code.
-It also follows `emacs-startup-hook'.  This hook exists for users to set,
-so as to override the definitions made by the terminal-specific file.
-Emacs never sets this variable itself.")
+  "Normal hook run immediately after `emacs-startup-hook'.
+In new code, there is no reason to use this instead of `emacs-startup-hook'.
+If you want to execute terminal-specific Lisp code, for example
+to override the definitions made by the terminal-specific file,
+see `tty-setup-hook'.")
+
+(make-obsolete-variable 'term-setup-hook
+                       "use either `emacs-startup-hook' or \
+`tty-setup-hook' instead." "24.4")
 
 (defvar inhibit-startup-hooks nil
   "Non-nil means don't run `term-setup-hook' and `emacs-startup-hook'.

=== modified file 'lisp/term/sun.el'
--- a/lisp/term/sun.el  2014-02-24 17:24:14 +0000
+++ b/lisp/term/sun.el  2014-02-25 08:41:47 +0000
@@ -123,7 +123,8 @@
 
 (defvar sun-raw-prefix-hooks nil
   "List of forms to evaluate after setting `sun-raw-prefix'.")
-(make-obsolete-variable 'sun-raw-prefix-hooks 'term-setup-hook "21.1")
+;; Obsolete since 21.1, but tty-setup-hook only exists since 24.4.
+(make-obsolete-variable 'sun-raw-prefix-hooks 'tty-setup-hook "21.1")
 
 
 
@@ -149,7 +150,9 @@
   (global-set-key [f7] 'enlarge-window)
 
   (when sun-raw-prefix-hooks
-    (message "sun-raw-prefix-hooks is obsolete!  Use term-setup-hook instead!")
+    (message "sun-raw-prefix-hooks is obsolete!  Use %s instead!"
+            (or (car-safe (get 'sun-raw-prefix-hooks 'byte-obsolete-variable))
+                "emacs-startup-hook"))
     (let ((hooks sun-raw-prefix-hooks))
       (while hooks
        (eval (car hooks))

=== modified file 'lisp/term/wyse50.el'
--- a/lisp/term/wyse50.el       2014-01-01 07:43:34 +0000
+++ b/lisp/term/wyse50.el       2014-02-25 08:41:47 +0000
@@ -1,7 +1,6 @@
 ;;; wyse50.el --- terminal support code for Wyse 50
 
-;; Copyright (C) 1989, 1993-1994, 2001-2014 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1989, 1993-1994, 2001-2014 Free Software Foundation, Inc.
 
 ;; Author: Daniel Pfeiffer <address@hidden>,
 ;;     Jim Blandy <address@hidden>
@@ -132,7 +131,7 @@
                         (concat "\ea23R" (1+ (frame-width)) "C\eG0"))))))
 
 (defun enable-arrow-keys ()
-  "To be called by `term-setup-hook'. Overrides 6 Emacs standard keys
+  "To be called by `tty-setup-hook'.  Overrides 6 Emacs standard keys
 whose functions are then typed as follows:
 C-a    Funct Left-arrow
 C-h    M-?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]