[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: redisplay-dont-pause does not work

From: David Kastrup
Subject: Re: redisplay-dont-pause does not work
Date: Fri, 09 Jun 2006 13:50:10 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

address@hidden (Kim F. Storm) writes:

> David Kastrup <address@hidden> writes:
>> If we are going to be mess around with sit-for's argument, we might as
>> well use
>> (sit-for -1)
>> This is perfectly logical, since then no input has been seen during
>> the time interval [0, limit].
> Excellent idea.

Given that `redisplay-dont-pause' did not work previously in
connection with sit-for (has there been some released Emacs version
where it did something useful?), I think changing the call interface
for sit-for to make negative arguments ignore pending input would be a
logical idea.

However, `redisplay-dont-pause' seems intended to be a user option,
and it is heeded at some points in the code.

In dispnew.c I find:

    /* Update display of window W.  FORCE_P non-zero means that we should
       not stop when detecting pending input.  */

    static int
    update_window (w, force_p)
         struct window *w;
         int force_p;
      struct glyph_matrix *desired_matrix = w->desired_matrix;
      int paused_p;
      int preempt_count = baud_rate / 2400 + 1;
      extern int input_pending;
      extern Lisp_Object do_mouse_tracking;
      /* Check that W's frame doesn't have glyph matrices.  */
      xassert (FRAME_WINDOW_P (XFRAME (WINDOW_FRAME (w))));
      xassert (updating_frame != NULL);

      /* Check pending input the first time so that we can quickly return.  */
      if (redisplay_dont_pause)
        force_p = 1;
        detect_input_pending_ignore_squeezables ();

      /* If forced to complete the update, or if no input is pending, do
         the update.  */

What is strange here is that if the function is entered with "force_p"
set, but not redisplay_dont_pause, then it will still do the input
detection thingy.  I don't know whether this is intended: I have no
clue about redisplay.

Other functions checking `redisplay_dont_pause' are update_frame_1,
and of course recently sit_for.  All of the functions appear to have a
"force_p" argument as well, which might suffice for passing the
information down the call chain from sit_for, but I am not too certain
about it.

And the way it reads in ChangeLog.21, `redisplay_dont_pause' might be
intended for use as a global variable representing a user preference.

It might probably make sense to retain that functionality (though I
have my doubts that it corresponds to consistent behavior), but still
make sit-for use its own argument for doing an unconditional refresh:
those functions seem not really too related.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]