emacs-pretest-bug
[Top][All Lists]
Advanced

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

[PATCH] Re: redisplay-dont-pause is not mentioned in the Emacs manual


From: Kim F. Storm
Subject: [PATCH] Re: redisplay-dont-pause is not mentioned in the Emacs manual
Date: Fri, 09 Jun 2006 01:21:27 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     The idea is:
>
>     (A) Don't _start_ redisplay if there is pending input,
>       i.e. process all available input before starting redisplay.
>
>     (B) Don't _interrupt_ redisplay once it has started.
>
> That is interesting.  I never thought about the question that way.
>
> When redisplay is as fast as it usually is nowadays, perhaps
> pre-emption after redisplay starts is entirely unnecessary.  We could
> set up a speed value above which pre-emption never occurs, and we
> could arrange to specify that speed for various kinds of terminals
> that are normally very fast.

A first step would be to provide more realistic settings for baud_rate
in xterm.c, macterm.c, and w32term.c -- for example, 250000 (assuming
that the connection is over a somewhat loaded half-duplex 10 MB LAN).

And then only enable pre-emptive redisplay if baud-rate is < 200000.

That would be a trivial change:

*** xterm.c     29 May 2006 23:20:19 +0200      1.917
--- xterm.c     09 Jun 2006 01:17:11 +0200      
***************
*** 10800,10806 ****
    fast_clear_end_of_line = 1; /* X does this well */
    memory_below_frame = 0;     /* we don't remember what scrolls
                                   off the bottom */
!   baud_rate = 19200;
  
    x_noop_count = 0;
    last_tool_bar_item = -1;
--- 10800,10806 ----
    fast_clear_end_of_line = 1; /* X does this well */
    memory_below_frame = 0;     /* we don't remember what scrolls
                                   off the bottom */
!   baud_rate = 250000;
  
    x_noop_count = 0;
    last_tool_bar_item = -1;

*** dispnew.c   04 Jun 2006 20:58:14 +0200      1.366
--- dispnew.c   09 Jun 2006 01:18:06 +0200      
***************
*** 4117,4125 ****
  #endif
  
    /* Check pending input the first time so that we can quickly return.  */
!   if (redisplay_dont_pause)
      force_p = 1;
!   else
      detect_input_pending_ignore_squeezables ();
  
    /* If forced to complete the update, or if no input is pending, do
--- 4117,4125 ----
  #endif
  
    /* Check pending input the first time so that we can quickly return.  */
!   if (redisplay_dont_pause || baud_rate >= 200000)
      force_p = 1;
!   else if (!force_p)
      detect_input_pending_ignore_squeezables ();
  
    /* If forced to complete the update, or if no input is pending, do
***************
*** 5143,5149 ****
    if (preempt_count <= 0)
      preempt_count = 1;
  
!   if (redisplay_dont_pause)
      force_p = 1;
    else if (!force_p && detect_input_pending_ignore_squeezables ())
      {
--- 5143,5149 ----
    if (preempt_count <= 0)
      preempt_count = 1;
  
!   if (redisplay_dont_pause || baud_rate >= 200000)
      force_p = 1;
    else if (!force_p && detect_input_pending_ignore_squeezables ())
      {
***************
*** 5200,5206 ****
                }
            }
  
!         if ((i - 1) % preempt_count == 0)
            detect_input_pending_ignore_squeezables ();
  
          update_frame_line (f, i);
--- 5200,5206 ----
                }
            }
  
!         if (!force_p && (i - 1) % preempt_count == 0)
            detect_input_pending_ignore_squeezables ();
  
          update_frame_line (f, i);


-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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