Document 'pre-redisplay-functions'
authorEli Zaretskii <eliz@gnu.org>
Wed, 13 Jan 2016 18:29:36 +0000 (20:29 +0200)
committerEli Zaretskii <eliz@gnu.org>
Wed, 13 Jan 2016 18:29:36 +0000 (20:29 +0200)
* doc/lispref/hooks.texi (Standard Hooks):
* doc/lispref/display.texi (Forcing Redisplay): Document
'pre-redisplay-functions'.

doc/lispref/display.texi
doc/lispref/hooks.texi
etc/NEWS

index 93b00e17daca615c6310351864e0206c07602b13..1ac0f05c7d49de19b921b4e5c67e900a8dc434ef 100644 (file)
@@ -95,11 +95,6 @@ redisplay proceeded to completion; it could have been preempted by
 newly arriving input.
 @end defun
 
-@defvar pre-redisplay-function
-A function run just before redisplay.  It is called with one argument,
-the set of windows to redisplay.
-@end defvar
-
   Although @code{redisplay} tries immediately to redisplay, it does
 not change how Emacs decides which parts of its frame(s) to redisplay.
 By contrast, the following function adds certain windows to the
@@ -117,6 +112,19 @@ This function does not do a redisplay immediately; Emacs does that as
 it waits for input, or when the function @code{redisplay} is called.
 @end defun
 
+@defvar pre-redisplay-function
+A function run just before redisplay.  It is called with one argument,
+the set of windows to be redisplayed.  The set can be @code{nil},
+meaning only the selected window, or @code{t}, meaning all the
+windows.
+@end defvar
+
+@defvar pre-redisplay-functions
+This hook is run just before redisplay.  It is called once in each
+window that is about to be redisplayed, with @code{current-buffer} set
+to the buffer displayed in that window.
+@end defvar
+
 @node Truncation
 @section Truncation
 @cindex line wrapping
index b8f761de30ef12360516aed431433a5796d863ee..1027aa0343f0353a8ecfdf2b9740bf793bc8ea01 100644 (file)
@@ -180,16 +180,6 @@ Hook run when about to switch windows with a mouse command.
 @item mouse-position-function
 @xref{Mouse Position}.
 
-@item post-command-hook
-@itemx pre-command-hook
-@xref{Command Overview}.
-
-@item post-gc-hook
-@xref{Garbage Collection}.
-
-@item post-self-insert-hook
-@xref{Keymaps and Minor Modes}.
-
 @item prefix-command-echo-keystrokes-functions
 @vindex prefix-command-echo-keystrokes-functions
 An abnormal hook run by prefix commands (such as @kbd{C-u}) which
@@ -206,6 +196,20 @@ the current prefix command state to the next command.  For example,
 @kbd{C-u} needs to pass the state to the next command when the user
 types @kbd{C-u -} or follows @kbd{C-u} with a digit.
 
+@item pre-redisplay-functions
+Hook run in each window just before redisplaying it.  @xref{Forcing
+Redisplay}.
+
+@item post-command-hook
+@itemx pre-command-hook
+@xref{Command Overview}.
+
+@item post-gc-hook
+@xref{Garbage Collection}.
+
+@item post-self-insert-hook
+@xref{Keymaps and Minor Modes}.
+
 @ignore
 @item prog-mode-hook
 @itemx special-mode-hook
index 076835c3d20beb6191c3e21a847fd6895059ab3d..c51136faf6328cd6d131d725b951f90790fa2a2b 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1349,7 +1349,9 @@ file byte offsets, given the file's encoding.
 ** The default value of `load-read-function' is now `read'.
 Previously, the default value of `nil' implied using `read'.
 
-** New hook `pre-redisplay-functions', a bit easier to use than pre-redisplay-function.
++++
+** New hook `pre-redisplay-functions'.
+It is a bit easier to use than `pre-redisplay-function'.
 
 ** The second arg of `looking-back' should always be provided explicitly.