From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20404: 25.0.50; Sometimes no fontification with jit-lock-defer-time Date: Thu, 23 Apr 2015 20:25:18 +0300 Message-ID: <83383q21vl.fsf@gnu.org> References: <87a8y0iji1.fsf@gnu.org> <20150422163110.68601.qmail@mail.muc.de> <87383rhqky.fsf@gnu.org> <83egnb3l2f.fsf@gnu.org> <877ft3cwf6.fsf@gnu.org> <83618n2vxu.fsf@gnu.org> <83h9s6282n.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1429809988 9888 80.91.229.3 (23 Apr 2015 17:26:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Apr 2015 17:26:28 +0000 (UTC) Cc: acm@muc.de, 20404@debbugs.gnu.org, tsdh@gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 23 19:26:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YlKt9-0004xw-HP for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Apr 2015 19:26:11 +0200 Original-Received: from localhost ([::1]:41361 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlKt8-0000Se-O4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Apr 2015 13:26:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlKt5-0000SV-DE for bug-gnu-emacs@gnu.org; Thu, 23 Apr 2015 13:26:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlKsz-0001q8-Uw for bug-gnu-emacs@gnu.org; Thu, 23 Apr 2015 13:26:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlKsz-0001q2-Re for bug-gnu-emacs@gnu.org; Thu, 23 Apr 2015 13:26:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YlKsz-0001RW-Kk for bug-gnu-emacs@gnu.org; Thu, 23 Apr 2015 13:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Apr 2015 17:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20404 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20404-submit@debbugs.gnu.org id=B20404.14298099275506 (code B ref 20404); Thu, 23 Apr 2015 17:26:01 +0000 Original-Received: (at 20404) by debbugs.gnu.org; 23 Apr 2015 17:25:27 +0000 Original-Received: from localhost ([127.0.0.1]:37971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YlKsQ-0001Qj-BS for submit@debbugs.gnu.org; Thu, 23 Apr 2015 13:25:26 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:41160) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YlKsN-0001QV-ES for 20404@debbugs.gnu.org; Thu, 23 Apr 2015 13:25:24 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NN900K00SDQQO00@a-mtaout22.012.net.il> for 20404@debbugs.gnu.org; Thu, 23 Apr 2015 20:25:16 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NN900KKBSE4GW70@a-mtaout22.012.net.il>; Thu, 23 Apr 2015 20:25:16 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:101940 Archived-At: > From: Stefan Monnier > Cc: tsdh@gnu.org, acm@muc.de, 20404@debbugs.gnu.org > Date: Thu, 23 Apr 2015 12:23:02 -0400 > > > http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00705.html > > This message of yours seems to be talking about the problem I'm > referring to above. At least, the way I read it, it seems to say that > `input-pending-p' can return nil even if there is pending input > (because that pending input is still in the system's input queue). I don't see how what you say can follow from what I wrote in that message. What I say there is that while we process keystrokes, we don't call read_socket_hook. This observation is based on the code of get_input_pending, which is the workhorse of input-pending-p: static bool get_input_pending (int flags) { /* First of all, have we already counted some input? */ input_pending = (!NILP (Vquit_flag) || readable_events (flags)); /* If input is being read as it arrives, and we have none, there is none. */ if (!input_pending && (!interrupt_input || interrupts_deferred)) { /* Try to read some input and see how much we get. */ gobble_input (); input_pending = (!NILP (Vquit_flag) || readable_events (flags)); } return input_pending; The call to read_socket_hook is in gobble_input, so if the first call to readable_events returns non-zero, as it happens when we have events waiting in our keyboard queue, we won't call read_socket_hook. But that doesn't mean input-pending-p will return nil when there's input unread by read_socket_hook, because once our keyboard queue gets emptied, readable_events will return zero, and then we _will_ call read_socket_hook to fill our queue, and then the second call to readable_events will return non-zero, and input-pending-p will return non-nil.