From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Using incremental parsing in Emacs Date: Mon, 06 Jan 2020 08:11:35 +0200 Message-ID: References: <83blrkj1o1.fsf@gnu.org> <20200105141900.GA71296@breton.holly.idiocy.org> <83eewdg3vy.fsf@gnu.org> <834kx9g08y.fsf@gnu.org> <83v9ppdzed.fsf@gnu.org> <5CFA58D6-8A85-4636-AB0E-1548D235D681@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="213220"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: K-9 Mail for Android Cc: alan@idiocy.org, monnier@iro.umontreal.ca To: emacs-devel@gnu.org, HaiJun Zhang , arthur miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 06 07:11:50 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ioLcE-000tNx-Ag for ged-emacs-devel@m.gmane.org; Mon, 06 Jan 2020 07:11:50 +0100 Original-Received: from localhost ([::1]:48590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioLcD-0003yg-38 for ged-emacs-devel@m.gmane.org; Mon, 06 Jan 2020 01:11:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52275) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioLc8-0003ya-D2 for emacs-devel@gnu.org; Mon, 06 Jan 2020 01:11:45 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ioLc6-0001U5-Tf; Mon, 06 Jan 2020 01:11:42 -0500 Original-Received: from [176.12.180.157] (port=34071 helo=[10.212.47.98]) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ioLc3-0001xy-9v; Mon, 06 Jan 2020 01:11:42 -0500 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:244024 Archived-At: On January 6, 2020 7:55:02 AM GMT+02:00, HaiJun Zhang wrote: > In the test cpp file, there is a =C2=A0=E2=80=9C/*=E2=80=9D at the begin= ning and no =E2=80=9C*/=E2=80=9C in > the file=2E So all contents of the file are comment=2E If it doesn=E2=80= =99t parse > from the beginning of the file, how can it known they are comment when > the point is at the end of buffer? >=20 That's up to the fontification-functions the display engine calls=2E The = major mode defines its fontification function, and that function can look b= efore and after the chunk passed to it=2E In the case of your file, look i= n CC Mode to see what it does=20