From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Re: font lock with functions Date: Wed, 01 Apr 2020 12:13:20 +0200 Message-ID: <871rp7h5tr.fsf@randomsample> References: <86tv2h2vww.fsf@gmail.com> <20200322123818.GB32470@ACM> <87eetk5swm.fsf@gnu.org> <20200326193128.GC14092@ACM> <86d08y4zsx.fsf@gmail.com> <83sghs7qdz.fsf@gnu.org> <7ee94ed4-7a11-90bd-df69-c0eeacaf191c@gmail.com> <835zeo7c92.fsf@gnu.org> <05de335b-383e-b32d-2e7e-e79192d364de@yandex.ru> <03981ead-3aca-c238-a9d0-88407ffae451@yandex.ru> <83wo745tw6.fsf@gnu.org> <837dz35j30.fsf@gnu.org> <9b013d7f-664a-711d-0b7b-d7bd961b8ef0@yandex.ru> <87a73w4yp6.fsf@randomsample> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="38496"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.90 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org, cpitclaudel@gmail.com, Dmitry Gutov To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 01 12:16:42 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJaQM-0009vw-Lk for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Apr 2020 12:16:42 +0200 Original-Received: from localhost ([::1]:57590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJaQL-0002hG-O3 for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Apr 2020 06:16:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46029) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJaNQ-0006Jz-5l for emacs-devel@gnu.org; Wed, 01 Apr 2020 06:13:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJaNO-0006iF-LZ for emacs-devel@gnu.org; Wed, 01 Apr 2020 06:13:39 -0400 Original-Received: from randomsample.de ([5.45.97.173]:48931) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJaNO-0006fQ-6P; Wed, 01 Apr 2020 06:13:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=JQJoXK5VnwTRh7MV2KRCDMhY2lzGOdDiMcPzN262QHA=; b=ZBpiCd9Buj+lfTcSYp4M2Dzsk0bcrMtofOuuhs4W+xJ/fKE39CK7gk+VXJQYOqwjX6gFSF/coOnu0IV7qLLrMj4uViyzMK4H/0Mh2jH/SoxJj8Iz4ANRrBEgkNEXL6vT; Original-Received: from ip5f5abaee.dynamic.kabel-deutschland.de ([95.90.186.238] helo=void) by randomsample.de with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1jJaNL-000748-7i; Wed, 01 Apr 2020 12:13:35 +0200 In-Reply-To: (Stefan Monnier's message of "Tue, 31 Mar 2020 09:20:37 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 5.45.97.173 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246184 Archived-At: >> - It is very easy during testing to completely hang your Emacs session >> if one of the font-lock functions hangs. One usually needs to kill >> Emacs in this case. > > `jit-lock-debug-mode` might be helpful there. Thanks. Did not know this one. > You can't use the `font-lock-keywords` special syntax for that, but you > can still do it (by hand). E.g. > (while ... > (put-text-property x y 'face 'foobar-face) > ...) > ;; Return nil if you don't want font-lock to call you again right away > ;; to "look for the next match". > nil) Oh, I see. This is very helpful. -David