aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-03-20 16:52:11 +0800
committerChong Yidong2012-03-20 16:52:11 +0800
commit025de85b0709596975ddcd0fa298f88d12493254 (patch)
tree32d0edb7f14590f3ddc709ecfdbacc8f1e867216
parentee52ebf3e27fc33defe5971c2410dbe8746919e3 (diff)
downloademacs-025de85b0709596975ddcd0fa298f88d12493254.tar.gz
emacs-025de85b0709596975ddcd0fa298f88d12493254.zip
Update doc to reflect new non-nil value of redisplay-dont-pause.
* doc/lispref/display.texi (Forcing Redisplay): Various rewrites to reflect new value of redisplay-dont-pause. (Truncation): Copyedits. * src/dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc to reflect default non-nil value of redisplay-dont-pause.
-rw-r--r--doc/lispref/ChangeLog6
-rw-r--r--doc/lispref/display.texi122
-rw-r--r--src/ChangeLog5
-rw-r--r--src/dispnew.c29
4 files changed, 88 insertions, 74 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index d8e96914d51..43ae349cb4c 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,9 @@
12012-03-20 Chong Yidong <cyd@gnu.org>
2
3 * display.texi (Forcing Redisplay): Various rewrites to reflect
4 new value of redisplay-dont-pause.
5 (Truncation): Copyedits.
6
12012-03-20 Glenn Morris <rgm@gnu.org> 72012-03-20 Glenn Morris <rgm@gnu.org>
2 8
3 * os.texi (Startup Summary): Don't mention initial-buffer-choice = t. 9 * os.texi (Startup Summary): Don't mention initial-buffer-choice = t.
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index c70418be52b..b68b0697936 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -86,59 +86,57 @@ attempt to redisplay, in the middle of Lisp code, without actually
86waiting for input. 86waiting for input.
87 87
88@defun redisplay &optional force 88@defun redisplay &optional force
89This function tries immediately to redisplay, provided there are no 89This function tries immediately to redisplay. The optional argument
90pending input events. 90@var{force}, if non-@code{nil}, forces the redisplay to be performed,
91 91instead of being preempted, even if input is pending and the variable
92If the optional argument @var{force} is non-@code{nil}, it does all 92@code{redisplay-dont-pause} is @code{nil} (see below). If
93pending redisplay work even if input is available, with no 93@code{redisplay-dont-pause} is non-@code{nil} (the default), this
94pre-emption. 94function redisplays in any case, i.e.@: @var{force} does nothing.
95 95
96The function returns @code{t} if it actually tried to redisplay, and 96The function returns @code{t} if it actually tried to redisplay, and
97@code{nil} otherwise. A value of @code{t} does not mean that 97@code{nil} otherwise. A value of @code{t} does not mean that
98redisplay proceeded to completion; it could have been pre-empted by 98redisplay proceeded to completion; it could have been preempted by
99newly arriving terminal input. 99newly arriving input.
100@end defun
101
102 @code{redisplay} with no argument tries immediately to redisplay,
103but has no effect on the usual rules for what parts of the screen to
104redisplay. By contrast, the following function adds certain windows
105to the pending redisplay work (as if their contents had completely
106changed), but doesn't immediately try to do any redisplay work.
107
108@defun force-window-update &optional object
109This function forces some or all windows to be updated on next
110redisplay. If @var{object} is a window, it requires eventual
111redisplay of that window. If @var{object} is a buffer or buffer name,
112it requires eventual redisplay of all windows displaying that buffer.
113If @var{object} is @code{nil} (or omitted), it requires eventual
114redisplay of all windows.
115@end defun 100@end defun
116 101
117 @code{force-window-update} does not do a redisplay immediately.
118(Emacs will do that when it waits for input.) Rather, its effect is
119to put more work on the queue to be done by redisplay whenever there
120is a chance.
121
122@defvar redisplay-dont-pause 102@defvar redisplay-dont-pause
123If this variable is non-@code{nil}, pending input does not prevent or 103If this variable is @code{nil}, arriving input events preempt
124halt redisplay; redisplay occurs, and finishes, regardless of whether 104redisplay; Emacs avoids starting a redisplay, and stops any redisplay
125input is available. If it is @code{nil}, Emacs redisplay stops if 105that is in progress, until the input has been processed. In
126input arrives, and does not happen at all if input is available before 106particular, @code{(redisplay)} returns @code{nil} without actually
127it starts. The default is @code{t}. 107redisplaying, if there is pending input.
108
109The default value is @code{t}, which means that pending input does not
110preempt redisplay.
128@end defvar 111@end defvar
129 112
130@defvar redisplay-preemption-period 113@defvar redisplay-preemption-period
131This variable specifies how many seconds Emacs waits between checks 114If @code{redisplay-dont-pause} is @code{nil}, this variable specifies
132for new input during redisplay. (The default is 0.1 seconds.) If 115how many seconds Emacs waits between checks for new input during
133input has arrived when Emacs checks, it pre-empts redisplay and 116redisplay; if input arrives during this interval, redisplay stops and
134processes the available input before trying again to redisplay. 117the input is processed. The default value is 0.1; if the value is
118@code{nil}, Emacs does not check for input during redisplay.
119
120This variable has no effect when @code{redisplay-dont-pause} is
121non-@code{nil} (the default).
122@end defvar
135 123
136If this variable is @code{nil}, Emacs does not check for input during 124 Although @code{redisplay} tries immediately to redisplay, it does
137redisplay, and redisplay cannot be preempted by input. 125not change how Emacs decides which parts of its frame(s) to redisplay.
126By contrast, the following function adds certain windows to the
127pending redisplay work (as if their contents had completely changed),
128but does not immediately try to perform redisplay.
138 129
139This variable is only obeyed on graphical terminals. For 130@defun force-window-update &optional object
140text terminals, see @ref{Terminal Output}. 131This function forces some or all windows to be updated the next time
141@end defvar 132Emacs does a redisplay. If @var{object} is a window, that window is
133to be updated. If @var{object} is a buffer or buffer name, all
134windows displaying that buffer are to be updated. If @var{object} is
135@code{nil} (or omitted), all windows are to be updated.
136
137This function does not do a redisplay immediately; Emacs does that as
138it waits for input, or when the function @code{redisplay} is called.
139@end defun
142 140
143@node Truncation 141@node Truncation
144@section Truncation 142@section Truncation
@@ -169,7 +167,7 @@ If this buffer-local variable is non-@code{nil}, lines that extend
169beyond the right edge of the window are truncated; otherwise, they are 167beyond the right edge of the window are truncated; otherwise, they are
170continued. As a special exception, the variable 168continued. As a special exception, the variable
171@code{truncate-partial-width-windows} takes precedence in 169@code{truncate-partial-width-windows} takes precedence in
172@dfn{partial-width} windows (i.e., windows that do not occupy the 170@dfn{partial-width} windows (i.e.@: windows that do not occupy the
173entire frame width). 171entire frame width).
174@end defopt 172@end defopt
175 173
@@ -192,37 +190,37 @@ a window, that forces truncation.
192 190
193@defvar wrap-prefix 191@defvar wrap-prefix
194If this buffer-local variable is non-@code{nil}, it defines a 192If this buffer-local variable is non-@code{nil}, it defines a
195``prefix'' that is prepended to every continuation line at 193@dfn{wrap prefix} which Emacs displays at the start of every
196display time. (If lines are truncated, the wrap-prefix is never 194continuation line. (If lines are truncated, @code{wrap-prefix} is
197used.) It may be a string or an image (@pxref{Other Display Specs}), 195never used.) Its value may be a string or an image (@pxref{Other
198or a stretch of whitespace such as specified by the @code{:width} or 196Display Specs}), or a stretch of whitespace such as specified by the
199@code{:align-to} display properties (@pxref{Specified Space}). The 197@code{:width} or @code{:align-to} display properties (@pxref{Specified
200value is interpreted in the same way as a @code{display} text 198Space}). The value is interpreted in the same way as a @code{display}
201property. @xref{Display Property}. 199text property. @xref{Display Property}.
202 200
203A wrap-prefix may also be specified for regions of text, using the 201A wrap prefix may also be specified for regions of text, using the
204@code{wrap-prefix} text or overlay property. This takes precedence 202@code{wrap-prefix} text or overlay property. This takes precedence
205over the @code{wrap-prefix} variable. @xref{Special Properties}. 203over the @code{wrap-prefix} variable. @xref{Special Properties}.
206@end defvar 204@end defvar
207 205
208@defvar line-prefix 206@defvar line-prefix
209If this buffer-local variable is non-@code{nil}, it defines a 207If this buffer-local variable is non-@code{nil}, it defines a
210``prefix'' that is prepended to every non-continuation line at 208@dfn{line prefix} which Emacs displays at the start of every
211display time. It may be a string or an image (@pxref{Other Display 209non-continuation line. Its value may be a string or an image
212Specs}), or a stretch of whitespace such as specified by the 210(@pxref{Other Display Specs}), or a stretch of whitespace such as
213@code{:width} or @code{:align-to} display properties (@pxref{Specified 211specified by the @code{:width} or @code{:align-to} display properties
214Space}). The value is interpreted in the same way as a @code{display} 212(@pxref{Specified Space}). The value is interpreted in the same way
215text property. @xref{Display Property}. 213as a @code{display} text property. @xref{Display Property}.
216 214
217A line-prefix may also be specified for regions of text using the 215A line prefix may also be specified for regions of text using the
218@code{line-prefix} text or overlay property. This takes precedence 216@code{line-prefix} text or overlay property. This takes precedence
219over the @code{line-prefix} variable. @xref{Special Properties}. 217over the @code{line-prefix} variable. @xref{Special Properties}.
220@end defvar 218@end defvar
221 219
222 If your buffer contains @emph{very} long lines, and you use 220 If your buffer contains @emph{very} long lines, and you use
223continuation to display them, computing the continuation lines can 221continuation to display them, computing the continuation lines can
224make Emacs redisplay slow. The column computation and indentation 222make redisplay slow. The column computation and indentation functions
225functions also become slow. Then you might find it advisable to set 223also become slow. Then you might find it advisable to set
226@code{cache-long-line-scans} to @code{t}. 224@code{cache-long-line-scans} to @code{t}.
227 225
228@defvar cache-long-line-scans 226@defvar cache-long-line-scans
diff --git a/src/ChangeLog b/src/ChangeLog
index 8b1221ab6d8..ae8835478a5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12012-03-20 Chong Yidong <cyd@gnu.org>
2
3 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
4 to reflect default non-nil value of redisplay-dont-pause.
5
12012-03-19 Kenichi Handa <handa@m17n.org> 62012-03-19 Kenichi Handa <handa@m17n.org>
2 7
3 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make 8 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
diff --git a/src/dispnew.c b/src/dispnew.c
index d302e717ec2..02d6de53bbf 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -6068,10 +6068,14 @@ sit_for (Lisp_Object timeout, int reading, int do_display)
6068 6068
6069 6069
6070DEFUN ("redisplay", Fredisplay, Sredisplay, 0, 1, 0, 6070DEFUN ("redisplay", Fredisplay, Sredisplay, 0, 1, 0,
6071 doc: /* Perform redisplay if no input is available. 6071 doc: /* Perform redisplay.
6072If optional arg FORCE is non-nil or `redisplay-dont-pause' is non-nil, 6072Optional arg FORCE, if non-nil, prevents redisplay from being
6073perform a full redisplay even if input is available. 6073preempted by arriving input, even if `redisplay-dont-pause' is nil.
6074Return t if redisplay was performed, nil otherwise. */) 6074If `redisplay-dont-pause' is non-nil (the default), redisplay is never
6075preempted by arriving input, so FORCE does nothing.
6076
6077Return t if redisplay was performed, nil if redisplay was preempted
6078immediately by pending input. */)
6075 (Lisp_Object force) 6079 (Lisp_Object force)
6076{ 6080{
6077 int count; 6081 int count;
@@ -6521,21 +6525,21 @@ syms_of_display (void)
6521 DEFSYM (Qredisplay_dont_pause, "redisplay-dont-pause"); 6525 DEFSYM (Qredisplay_dont_pause, "redisplay-dont-pause");
6522 6526
6523 DEFVAR_INT ("baud-rate", baud_rate, 6527 DEFVAR_INT ("baud-rate", baud_rate,
6524 doc: /* *The output baud rate of the terminal. 6528 doc: /* The output baud rate of the terminal.
6525On most systems, changing this value will affect the amount of padding 6529On most systems, changing this value will affect the amount of padding
6526and the other strategic decisions made during redisplay. */); 6530and the other strategic decisions made during redisplay. */);
6527 6531
6528 DEFVAR_BOOL ("inverse-video", inverse_video, 6532 DEFVAR_BOOL ("inverse-video", inverse_video,
6529 doc: /* *Non-nil means invert the entire frame display. 6533 doc: /* Non-nil means invert the entire frame display.
6530This means everything is in inverse video which otherwise would not be. */); 6534This means everything is in inverse video which otherwise would not be. */);
6531 6535
6532 DEFVAR_BOOL ("visible-bell", visible_bell, 6536 DEFVAR_BOOL ("visible-bell", visible_bell,
6533 doc: /* *Non-nil means try to flash the frame to represent a bell. 6537 doc: /* Non-nil means try to flash the frame to represent a bell.
6534 6538
6535See also `ring-bell-function'. */); 6539See also `ring-bell-function'. */);
6536 6540
6537 DEFVAR_BOOL ("no-redraw-on-reenter", no_redraw_on_reenter, 6541 DEFVAR_BOOL ("no-redraw-on-reenter", no_redraw_on_reenter,
6538 doc: /* *Non-nil means no need to redraw entire frame after suspending. 6542 doc: /* Non-nil means no need to redraw entire frame after suspending.
6539A non-nil value is useful if the terminal can automatically preserve 6543A non-nil value is useful if the terminal can automatically preserve
6540Emacs's frame display when you reenter Emacs. 6544Emacs's frame display when you reenter Emacs.
6541It is up to you to set this variable if your terminal can do that. */); 6545It is up to you to set this variable if your terminal can do that. */);
@@ -6590,14 +6594,15 @@ See `buffer-display-table' for more information. */);
6590 Vstandard_display_table = Qnil; 6594 Vstandard_display_table = Qnil;
6591 6595
6592 DEFVAR_BOOL ("redisplay-dont-pause", redisplay_dont_pause, 6596 DEFVAR_BOOL ("redisplay-dont-pause", redisplay_dont_pause,
6593 doc: /* *Non-nil means display update isn't paused when input is detected. */); 6597 doc: /* Non-nil means display update isn't paused when input is detected. */);
6594 redisplay_dont_pause = 1; 6598 redisplay_dont_pause = 1;
6595 6599
6596#if PERIODIC_PREEMPTION_CHECKING 6600#if PERIODIC_PREEMPTION_CHECKING
6597 DEFVAR_LISP ("redisplay-preemption-period", Vredisplay_preemption_period, 6601 DEFVAR_LISP ("redisplay-preemption-period", Vredisplay_preemption_period,
6598 doc: /* *The period in seconds between checking for input during redisplay. 6602 doc: /* Period in seconds between checking for input during redisplay.
6599If input is detected, redisplay is pre-empted, and the input is processed. 6603This has an effect only if `redisplay-dont-pause' is nil; in that
6600If nil, never pre-empt redisplay. */); 6604case, arriving input preempts redisplay until the input is processed.
6605If the value is nil, redisplay is never preempted. */);
6601 Vredisplay_preemption_period = make_float (0.10); 6606 Vredisplay_preemption_period = make_float (0.10);
6602#endif 6607#endif
6603 6608