From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: font lock with functions Date: Tue, 31 Mar 2020 10:56:04 -0400 Message-ID: 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="127472"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , cpitclaudel@gmail.com, David Engster , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 31 16:57:02 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 1jJIK5-000X0r-TI for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Mar 2020 16:57:01 +0200 Original-Received: from localhost ([::1]:39542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJIK4-0007YC-TY for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Mar 2020 10:57:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56196) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJIJK-0006PD-4f for emacs-devel@gnu.org; Tue, 31 Mar 2020 10:56:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJIJI-000456-Ur for emacs-devel@gnu.org; Tue, 31 Mar 2020 10:56:13 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:63605) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jJIJE-00042N-G6; Tue, 31 Mar 2020 10:56:08 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 9A3C8100BDE; Tue, 31 Mar 2020 10:56:07 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id E22F8100925; Tue, 31 Mar 2020 10:56:05 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1585666565; bh=40eNQpQ5SVcdt4bISB2VTOjSGNmEbuItVkf7AurmVWo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=VGSGJ7jOhU79P9xzYaw3FjrC/lKKl+37qQEZM/eMRJSWd6oUgP+uRJNcrFH0XMcZ1 AfFoVKzrD0GtbEHhNveI1pQO0x4SMfbbOoel91cLFSdmAq4wMpGQ2YnCQ0FggcfMLG at7h2WYBoTag/k5aC653u0EPt8mSZoimHPs/zbcI/v6jY/luJUj4WllYtvGjMlNJhv RfV/SwTVA6+k4RbvJaaM7g+DLFotcBY8g1ENSeYTAIfPivdyICRJh0NG0Diyzp2a9i PTy3scxmBuW5slEr/IcTr3j2wBQCGo/t2wumDDsY4CtJ7YACtIkchRkUZz6e/s6nX6 xVvSFLKxz7URQ== Original-Received: from alfajor (unknown [104.247.241.114]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4F6981203B6; Tue, 31 Mar 2020 10:56:05 -0400 (EDT) In-Reply-To: (Dmitry Gutov's message of "Tue, 31 Mar 2020 17:25:41 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 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:246104 Archived-At: >> (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". > > I was going to suggesting this myself, but isn't this approach even more of > a hack (i.e. undocumented feature)? I don't see it as a hack, no. It would be nice for font-lock to provide a more direct way to get the same result, but it's what we have. Stefan