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

Work around an Emacs Bug in `read-event' (or `sit-for')



Hello,

this patch works around a bug in Emacs.  For more information see

<87abpvq4k9.fsf@xxxxxxxxxxxxxxxxxx>

or

<http://permalink.gmane.org/gmane.emacs.devel/82407>

2007-11-03  David Hansen  <david.hansen@xxxxxxx>

	* w3m-proc.el (w3m-process-wait-process): Preserve the current buffer
          (work around an Emacs bug).
Index: w3m-proc.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m-proc.el,v
retrieving revision 1.64
diff -c -r1.64 w3m-proc.el
*** w3m-proc.el	26 Oct 2007 08:22:50 -0000	1.64
--- w3m-proc.el	3 Nov 2007 05:44:03 -0000
***************
*** 349,355 ****
      (let ((start (current-time)))
        (while (or (and (prog2
  			  (discard-input)
! 			  (not (sit-for 1))
  			(discard-input))
  		      ;; Some input is detected but it may be a key
  		      ;; press event which should be ignored when the
--- 349,355 ----
      (let ((start (current-time)))
        (while (or (and (prog2
  			  (discard-input)
! 			  (not (save-current-buffer (sit-for 1)))
  			(discard-input))
  		      ;; Some input is detected but it may be a key
  		      ;; press event which should be ignored when the


Diffs between working revision and workfile end here.