]> code.delx.au - gnu-emacs/commitdiff
Doc updates re window-setup-hook
authorGlenn Morris <rgm@gnu.org>
Fri, 6 Jun 2014 07:19:23 +0000 (00:19 -0700)
committerGlenn Morris <rgm@gnu.org>
Fri, 6 Jun 2014 07:19:23 +0000 (00:19 -0700)
* lisp/startup.el (window-setup-hook): Doc fix.

* doc/lispref/display.texi (Window Systems): Remove window-setup-hook.

* doc/lispref/os.texi (Startup Summary, Init File):
Improve description of window-setup-hook.
(Terminal-Specific): Update window-setup-hook cross-reference.

* doc/lispref/hooks.texi (Standard Hooks):
Update window-setup-hook cross-reference.

doc/lispref/ChangeLog
doc/lispref/display.texi
doc/lispref/hooks.texi
doc/lispref/os.texi
lisp/ChangeLog
lisp/startup.el

index 060dca1adcf166491b2bf1e2321d816e1a2ed6dd..1e6b9f445c70aecc03e3da9e013192dab69f3e77 100644 (file)
@@ -1,5 +1,11 @@
 2014-06-06  Glenn Morris  <rgm@gnu.org>
 
+       * display.texi (Window Systems): Remove window-setup-hook.
+       * os.texi (Startup Summary, Init File):
+       Improve description of window-setup-hook.
+       (Terminal-Specific): Update window-setup-hook cross-reference.
+       * hooks.texi (Standard Hooks): Update window-setup-hook cross-reference.
+
        * display.texi (Overlay Properties): Update re priority.  (Bug#17234)
 
 2014-06-05  Glenn Morris  <rgm@gnu.org>
index 35282138b1a44667b5238ac46282743a76665411..b4f987bb2a8e2e2e9cab707759d5fd13ac3ea54f 100644 (file)
@@ -6519,18 +6519,6 @@ indicator of Emacs capabilities on a given display type.  Instead, use
 @code{display-graphic-p} or any of the other @code{display-*-p}
 predicates described in @ref{Display Feature Testing}.
 
-@defvar window-setup-hook
-This variable is a normal hook which Emacs runs after handling the
-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
-@code{emacs-startup-hook}.
-
-This hook is used for internal purposes: setting up communication with
-the window system, and creating the initial window.  Users should not
-interfere with it.
-@end defvar
-
 @node Bidirectional Display
 @section Bidirectional Display
 @cindex bidirectional display
index 9408174872d5fe947eea521892f87aeabd810197..547a2ffe44246a29edebb1bedec67414a37e515a 100644 (file)
@@ -55,6 +55,7 @@ not exactly a hook, but does a similar job.
 @item after-init-hook
 @itemx before-init-hook
 @itemx emacs-startup-hook
+@itemx window-setup-hook
 @xref{Init File}.
 
 @item after-insert-file-functions
@@ -220,9 +221,6 @@ Hook run when about to switch windows with a mouse command.
 @itemx window-size-change-functions
 @xref{Window Hooks}.
 
-@item window-setup-hook
-@xref{Window Systems}.
-
 @item window-text-change-functions
 @vindex window-text-change-functions
 Functions to call in redisplay when text in the window might change.
index c80dfda096c8e427c348dccedf7473408b61db2a..272a356c7feaa1a8b1c2fb70e2c4c5ec4edf3445 100644 (file)
@@ -218,7 +218,9 @@ parameters of the selected frame according to whatever the init files
 specify.
 
 @item
-It runs @code{window-setup-hook}.  @xref{Window Systems}.
+It runs @code{window-setup-hook}.  The only difference between this
+hook and @code{emacs-startup-hook} is that this one runs after the
+previously mentioned modifications to the frame parameters.
 
 @item
 @cindex startup screen
@@ -411,6 +413,12 @@ This normal hook is run, once, just after handling the command line
 arguments.  In batch mode, Emacs does not run this hook.
 @end defvar
 
+@defvar window-setup-hook
+This normal hook is very similar to @code{emacs-startup-hook}.
+The only difference is that it runs slightly later, after setting
+of the frame parameters.  @xref{Startup Summary, window-setup-hook}.
+@end defvar
+
 @defvar user-init-file
 This variable holds the absolute file name of the user's init file.  If the
 actual init file loaded is a compiled file, such as @file{.emacs.elc},
@@ -487,7 +495,7 @@ 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}.
+For a related feature, @pxref{Init File, window-setup-hook}.
 @end defvar
 
 @node Command-Line Arguments
index 1280e39ec27fb272d35638b567bbd65e579206c0..3b5df032e9cba4143648f6292c0a00bcd624d9db 100644 (file)
@@ -1,3 +1,7 @@
+2014-06-06  Glenn Morris  <rgm@gnu.org>
+
+       * startup.el (window-setup-hook): Doc fix.
+
 2014-06-05  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/package.el (package-check-signature)
index 129b54d974f4a8d16b42f4fcc9f1214ce1cf7db7..5f1bdeadbd3cbf91949a0a89d250a6d292b5f28b 100644 (file)
@@ -302,9 +302,12 @@ keys for use under X.  It is used in a fashion analogous to the
 environment variable TERM.")
 
 (defvar window-setup-hook nil
-  "Normal hook run to initialize window system display.
-Emacs runs this hook after processing the command line arguments and loading
-the user's init file.")
+  "Normal hook run after loading init files and handling the command line.
+This is very similar to `emacs-startup-hook'.  The only difference
+is that this hook runs after frame parameters have been set up in
+response to any settings from your init file.  Unless this matters
+to you, use `emacs-startup-hook' instead.  (The name of this hook
+is due to historical reasons, and does not reflect its purpose very well.)")
 
 (defcustom initial-major-mode 'lisp-interaction-mode
   "Major mode command symbol to use for the initial `*scratch*' buffer."