comparison doc/lispref/display.texi @ 87098:ec0ef12211d9

Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-943
author Miles Bader <miles@gnu.org>
date Thu, 06 Dec 2007 00:46:18 +0000
parents 591c29778a30
children 107ccd98fa12
comparison
equal deleted inserted replaced
87097:781256628613 87098:ec0ef12211d9
53 53
54 @deffn Command redraw-display 54 @deffn Command redraw-display
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
76 programs such as Emacs and for ordinary sequential display. If you are 65 programs such as Emacs and for ordinary sequential display. If you are
77 using such a terminal, you might want to inhibit the redisplay on 66 using such a terminal, you might want to inhibit the redisplay on
87 76
88 @node Forcing Redisplay 77 @node Forcing Redisplay
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.
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
96 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
100 input has arrived when Emacs checks, it pre-empts redisplay and 134 input has arrived when Emacs checks, it pre-empts redisplay and
104 redisplay, and redisplay cannot be preempted by input. 138 redisplay, and redisplay cannot be preempted by input.
105 139
106 This variable is only obeyed on graphical terminals. For 140 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
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 143
126 @node Truncation 144 @node Truncation
127 @section Truncation 145 @section Truncation
128 @cindex line wrapping 146 @cindex line wrapping
129 @cindex line truncation 147 @cindex line truncation