diff options
| author | Richard M. Stallman | 2007-11-24 15:40:39 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2007-11-24 15:40:39 +0000 |
| commit | 20c63e44d1ad36b172bb38833cfe262d0679d927 (patch) | |
| tree | c11455b1551189f06b04817ef84e39773e3bf830 | |
| parent | 75a79fb387d4d01082d5fd7b0301d6a48b734321 (diff) | |
| download | emacs-20c63e44d1ad36b172bb38833cfe262d0679d927.tar.gz emacs-20c63e44d1ad36b172bb38833cfe262d0679d927.zip | |
(Refresh Screen, Forcing Redisplay):
Clarify the text and move items around.
| -rw-r--r-- | lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | lispref/display.texi | 80 |
2 files changed, 54 insertions, 31 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 36f2652dd8f..e63bfec00cf 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-11-24 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * display.texi (Refresh Screen, Forcing Redisplay): | ||
| 4 | Clarify the text and move items around. | ||
| 5 | |||
| 1 | 2007-11-15 Martin Rudalics <rudalics@gmx.at> | 6 | 2007-11-15 Martin Rudalics <rudalics@gmx.at> |
| 2 | 7 | ||
| 3 | * vol1.texi (Top): Remove Frame-Local Variables from Node Listing. | 8 | * vol1.texi (Top): Remove Frame-Local Variables from Node Listing. |
diff --git a/lispref/display.texi b/lispref/display.texi index 58b2ef11e72..2d129f62642 100644 --- a/lispref/display.texi +++ b/lispref/display.texi | |||
| @@ -55,21 +55,10 @@ This function clears and redisplays frame @var{frame}. | |||
| 55 | This function clears and redisplays all visible frames. | 55 | This function clears and redisplays all visible frames. |
| 56 | @end deffn | 56 | @end deffn |
| 57 | 57 | ||
| 58 | This function calls for redisplay of certain windows, the next time | 58 | In Emacs, processing user input takes priority over redisplay. If |
| 59 | redisplay is done, but does not clear them first. | 59 | you call these functions when input is available, they don't redisplay |
| 60 | 60 | immediately, but the requested redisplay does happen | |
| 61 | @defun force-window-update &optional object | 61 | eventually---after all the input has been processed. |
| 62 | This function forces some or all windows to be updated on next redisplay. | ||
| 63 | If @var{object} is a window, it forces redisplay of that window. If | ||
| 64 | @var{object} is a buffer or buffer name, it forces redisplay of all | ||
| 65 | windows displaying that buffer. If @var{object} is @code{nil} (or | ||
| 66 | omitted), it forces redisplay of all windows. | ||
| 67 | @end defun | ||
| 68 | |||
| 69 | Processing user input takes absolute priority over redisplay. If you | ||
| 70 | call these functions when input is available, they do nothing | ||
| 71 | immediately, but a full redisplay does happen eventually---after all the | ||
| 72 | input has been processed. | ||
| 73 | 62 | ||
| 74 | Normally, suspending and resuming Emacs also refreshes the screen. | 63 | Normally, suspending and resuming Emacs also refreshes the screen. |
| 75 | Some terminal emulators record separate contents for display-oriented | 64 | Some terminal emulators record separate contents for display-oriented |
| @@ -89,11 +78,56 @@ to redraw, @code{nil} means redrawing is needed. The default is @code{nil}. | |||
| 89 | @section Forcing Redisplay | 78 | @section Forcing Redisplay |
| 90 | @cindex forcing redisplay | 79 | @cindex forcing redisplay |
| 91 | 80 | ||
| 81 | Emacs normally tries to redisplay the screen whenever it waits for | ||
| 82 | input. With this function you can request an immediate attempt to | ||
| 83 | redisplay, in the middle of Lisp code, without actually waiting for | ||
| 84 | input. | ||
| 85 | |||
| 86 | @defun redisplay &optional force | ||
| 87 | This function tries immediately to redisplay, provided there are no | ||
| 88 | pending input events. It is equivalent to @code{(sit-for 0)}. | ||
| 89 | |||
| 90 | If the optional argument @var{force} is non-@code{nil}, it does all | ||
| 91 | pending redisplay work even if input is available, with no | ||
| 92 | pre-emption. | ||
| 93 | |||
| 94 | The function returns @code{t} if it actually tried to redisplay, and | ||
| 95 | @code{nil} otherwise. A value of @code{t} does not mean that | ||
| 96 | redisplay proceeded to completion; it could have been pre-empted by | ||
| 97 | newly arriving terminal input. | ||
| 98 | @end defun | ||
| 99 | |||
| 100 | @code{redisplay} with no argument tries immediately to redisplay, | ||
| 101 | but has no effect on the usual rules for what parts of the screen to | ||
| 102 | redisplay. By contrast, the following function adds certain windows | ||
| 103 | to the pending redisplay work (as if their contents had completely | ||
| 104 | changed), but doesn't immediately try to do any redisplay work. | ||
| 105 | |||
| 106 | @defun force-window-update &optional object | ||
| 107 | This function forces some or all windows to be updated on next | ||
| 108 | redisplay. If @var{object} is a window, it requires eventual | ||
| 109 | redisplay of that window. If @var{object} is a buffer or buffer name, | ||
| 110 | it requires eventual redisplay of all windows displaying that buffer. | ||
| 111 | If @var{object} is @code{nil} (or omitted), it requires eventual | ||
| 112 | redisplay of all windows. | ||
| 113 | @end defun | ||
| 114 | |||
| 115 | @code{force-window-update} does not do a redisplay immediately. | ||
| 116 | (Emacs will do that when it waits for input.) Rather, its effect is | ||
| 117 | to put more work on the queue to be done by redisplay whenever there | ||
| 118 | is a chance. | ||
| 119 | |||
| 92 | Emacs redisplay normally stops if input arrives, and does not happen | 120 | Emacs redisplay normally stops if input arrives, and does not happen |
| 93 | at all if input is available before it starts. Most of the time, this | 121 | at all if input is available before it starts. Most of the time, this |
| 94 | is exactly what you want. However, you can prevent preemption by | 122 | is exactly what you want. However, you can prevent preemption by |
| 95 | binding @code{redisplay-dont-pause} to a non-@code{nil} value. | 123 | binding @code{redisplay-dont-pause} to a non-@code{nil} value. |
| 96 | 124 | ||
| 125 | @defvar redisplay-dont-pause | ||
| 126 | If this variable is non-@code{nil}, pending input does not | ||
| 127 | prevent or halt redisplay; redisplay occurs, and finishes, | ||
| 128 | regardless of whether input is available. | ||
| 129 | @end defvar | ||
| 130 | |||
| 97 | @defvar redisplay-preemption-period | 131 | @defvar redisplay-preemption-period |
| 98 | This variable specifies how many seconds Emacs waits between checks | 132 | This variable specifies how many seconds Emacs waits between checks |
| 99 | for new input during redisplay. (The default is 0.1 seconds.) If | 133 | for new input during redisplay. (The default is 0.1 seconds.) If |
| @@ -107,22 +141,6 @@ This variable is only obeyed on graphical terminals. For | |||
| 107 | text terminals, see @ref{Terminal Output}. | 141 | text terminals, see @ref{Terminal Output}. |
| 108 | @end defvar | 142 | @end defvar |
| 109 | 143 | ||
| 110 | @defvar redisplay-dont-pause | ||
| 111 | If this variable is non-@code{nil}, pending input does not | ||
| 112 | prevent or halt redisplay; redisplay occurs, and finishes, | ||
| 113 | regardless of whether input is available. | ||
| 114 | @end defvar | ||
| 115 | |||
| 116 | @defun redisplay &optional force | ||
| 117 | This function performs an immediate redisplay provided there are no | ||
| 118 | pending input events. This is equivalent to @code{(sit-for 0)}. | ||
| 119 | |||
| 120 | If the optional argument @var{force} is non-@code{nil}, it forces an | ||
| 121 | immediate and complete redisplay even if input is available. | ||
| 122 | |||
| 123 | Returns @code{t} if redisplay was performed, or @code{nil} otherwise. | ||
| 124 | @end defun | ||
| 125 | |||
| 126 | @node Truncation | 144 | @node Truncation |
| 127 | @section Truncation | 145 | @section Truncation |
| 128 | @cindex line wrapping | 146 | @cindex line wrapping |