From: Eli Zaretskii Date: Wed, 13 Jan 2016 18:29:36 +0000 (+0200) Subject: Document 'pre-redisplay-functions' X-Git-Tag: emacs-25.0.90~177 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3db8ce4fbd75b978d658df58810adf1deca04708;p=emacs.git Document 'pre-redisplay-functions' * doc/lispref/hooks.texi (Standard Hooks): * doc/lispref/display.texi (Forcing Redisplay): Document 'pre-redisplay-functions'. --- diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 93b00e17dac..1ac0f05c7d4 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -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 diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi index b8f761de30e..1027aa0343f 100644 --- a/doc/lispref/hooks.texi +++ b/doc/lispref/hooks.texi @@ -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 diff --git a/etc/NEWS b/etc/NEWS index 076835c3d20..c51136faf63 100644 --- 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.