summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-02-25 00:41:47 -0800
committerGlenn Morris <rgm@gnu.org>2014-02-25 00:41:47 -0800
commit98bd6b321c3efbb5d7c5d3c0dbbcecbccf5fda3f (patch)
tree360d2816c6a875d5920a1f26c01cc4de437c38b1 /lisp
parenta038bd8769ec54ecf7d7241ccef8decc0dc712b5 (diff)
downloademacs-98bd6b321c3efbb5d7c5d3c0dbbcecbccf5fda3f.tar.gz
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 'lisp')
-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
6 files changed, 33 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 69434453c85..67256c588e7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
+2014-02-25 Glenn Morris <rgm@gnu.org>
+
+ * 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 <lekktu@gmail.com>
* 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 @@
;;; 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 <Kevin.Gallagher@boeing.com>
;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com>
@@ -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.
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."
(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.
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 @@
;;; 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: emacs-devel@gnu.org
;; Keywords: internal
@@ -282,10 +281,15 @@ these functions will invoke the debugger.")
"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'.
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 @@
(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))
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 @@
;;; 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 <occitan@esperanto.org>,
;; Jim Blandy <jimb@occs.cs.oberlin.edu>
@@ -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-?