summaryrefslogtreecommitdiff
path: root/src/xdisp.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-09-02 10:10:35 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-09-02 10:10:35 -0700
commit1882aa387874f0ac0965fa7bec1c5760dc37e48f (patch)
tree27cfcfb9f16c55a0bf84a5c91a5efd20f495ef55 /src/xdisp.c
parenta411ac43d3667d042fa36361275eccbe9aca80af (diff)
downloademacs-1882aa387874f0ac0965fa7bec1c5760dc37e48f.tar.gz
* emacs.c, eval.c: Use bool for boolean.
* emacs.c (initialized, inhibit_window_system, running_asynch_code): (malloc_using_checking) [DOUG_LEA_MALLOC]: (display_arg) [HAVE_X_WINDOWS || HAVE_NS]: (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch) (main, decode_env_path, Fdaemon_initialized): * eval.c (call_debugger, Finteractive_p, interactive_p): (unwind_to_catch, Fsignal, wants_debugger, skip_debugger) (maybe_call_debugger, Fbacktrace): * process.c (read_process_output, exec_sentinel): Use bool for booleans. * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X. All callers changed. * eval.c (interactive_p): Omit always-true boolean argument EXCLUDE_SUBRS_P. All callers changed. * dispextern.h, lisp.h: Reflect above API changes. * firstfile.c (dummy): Use the address of 'main', whose signature won't change, instead of the address of 'initialize', whose signature just changed from int to bool. * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ... * msdos.c (fatal_error_in_progress): ... from here. * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead of incrementing it. (redisplay_internal, unwind_redisplay): Simply clear REDISPLAYING_P when unwinding, instead of saving its previous, always-false value and then restoring it.
Diffstat (limited to 'src/xdisp.c')
-rw-r--r--src/xdisp.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 13b03736bde..86f041dea4d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -768,9 +768,9 @@ static int clear_image_cache_count;
static struct glyph_slice null_glyph_slice = { 0, 0, 0, 0 };
#endif
-/* Non-zero while redisplay_internal is in progress. */
+/* True while redisplay_internal is in progress. */
-int redisplaying_p;
+bool redisplaying_p;
static Lisp_Object Qinhibit_free_realized_faces;
static Lisp_Object Qmode_line_default_help_echo;
@@ -12966,12 +12966,11 @@ redisplay_internal (void)
if (redisplaying_p)
return;
- /* Record a function that resets redisplaying_p to its old value
+ /* Record a function that clears redisplaying_p
when we leave this function. */
count = SPECPDL_INDEX ();
- record_unwind_protect (unwind_redisplay,
- Fcons (make_number (redisplaying_p), selected_frame));
- ++redisplaying_p;
+ record_unwind_protect (unwind_redisplay, selected_frame);
+ redisplaying_p = 1;
specbind (Qinhibit_free_realized_faces, Qnil);
{
@@ -13709,21 +13708,15 @@ redisplay_preserve_echo_area (int from_where)
}
-/* Function registered with record_unwind_protect in
- redisplay_internal. Reset redisplaying_p to the value it had
- before redisplay_internal was called, and clear
- prevent_freeing_realized_faces_p. It also selects the previously
+/* Function registered with record_unwind_protect in redisplay_internal.
+ Clear redisplaying_p. Also, select the previously
selected frame, unless it has been deleted (by an X connection
failure during redisplay, for example). */
static Lisp_Object
-unwind_redisplay (Lisp_Object val)
+unwind_redisplay (Lisp_Object old_frame)
{
- Lisp_Object old_redisplaying_p, old_frame;
-
- old_redisplaying_p = XCAR (val);
- redisplaying_p = XFASTINT (old_redisplaying_p);
- old_frame = XCDR (val);
+ redisplaying_p = 0;
if (! EQ (old_frame, selected_frame)
&& FRAME_LIVE_P (XFRAME (old_frame)))
select_frame_for_redisplay (old_frame);