From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#23272: 25.0.92; syntax-propertize-via-font-lock considered harmful Date: Thu, 21 Nov 2019 01:22:41 +0200 Message-ID: References: <8637qrn4dy.fsf@yandex.ru> <87ftjarzuh.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="258651"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: 23272@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 21 00:23:31 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1iXZJr-0015Bm-CH for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Nov 2019 00:23:31 +0100 Original-Received: from localhost ([::1]:35002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iXZJp-0001Ru-Sx for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Nov 2019 18:23:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52153) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iXZJR-0001NP-5C for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2019 18:23:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iXZJP-0000tz-6f for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2019 18:23:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42261) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iXZJO-0000tF-I2 for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2019 18:23:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iXZJO-0006vW-6J for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2019 18:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Nov 2019 23:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23272 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 23272-submit@debbugs.gnu.org id=B23272.157429217726603 (code B ref 23272); Wed, 20 Nov 2019 23:23:02 +0000 Original-Received: (at 23272) by debbugs.gnu.org; 20 Nov 2019 23:22:57 +0000 Original-Received: from localhost ([127.0.0.1]:51082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXZJJ-0006v1-DY for submit@debbugs.gnu.org; Wed, 20 Nov 2019 18:22:57 -0500 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:45836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXZJI-0006uo-2r for 23272@debbugs.gnu.org; Wed, 20 Nov 2019 18:22:56 -0500 Original-Received: by mail-wr1-f52.google.com with SMTP id z10so1976515wrs.12 for <23272@debbugs.gnu.org>; Wed, 20 Nov 2019 15:22:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Q85J15PQOeA06hC7XK8XerjyufqJDS8aXNlO2fve5to=; b=vLEom9ZGtijmrFIhLXbbQVT6y+dURYZkMdG/ZiTujOdo2Il682iQJkl/jcKiv2FZeE WQGAEBoDIfjJPLi/FUPJtuUhEuagK5J1ukznyhZySY2G8FYWFOA6M0R4Uc66t3Wq3UZq ovpxPRZ79CsGFw3N2l8XT5wx5zWZgKRRy39EiYgL3pLerF2H03gFzoiq4bdPH+XJopMi oHszBHG+pgzoYu7oDCAgYZKaaA9VX9r0CjD6uOf+IrvGPqCc/WP30CzOyM2fukNa9LYK qV6Gb9ogm0nFSHdFEZQSHMyNl3E0Yu+Bcj0JHAY2KG2oBkcNLfm/cvLQgvSz1NVeBndd PIyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Q85J15PQOeA06hC7XK8XerjyufqJDS8aXNlO2fve5to=; b=cMUYOMHcMa0fnO/EYrKI+Pq8hVxL3Jj1vvqeOqttdPZWH2Dmwk2Vc6wLwHJrkiKa7n dlP4H67/G8eX/D1QltKRRJknLMDAl27kWLntnwmJTPr6RTYD6DQ6iXvezPg3wvFZrbGo gQ2dvxPw8B9sNmRhZNoJKPgv8z274VKCFgLhdQD7yfXjEewMX/9IXTur4rCj8vMJEl05 coUxzEcnuu3mHmKPKLHzEoynpk3QLG7pU6bzMmvwGN+kov1Csslk39qMbrBtmYifXL0f WCdNQFCYffmeieZGL1V4qezygQSfjgKcy47Hm6JeuZ8tmin6k8BBH2fxOSWRHC4odx3e h+Yw== X-Gm-Message-State: APjAAAXjYUjXe8X1DRth08q505TOv3SfgdmvwgcYmcV29ssULKdapGo3 I6y6t6Nn4ZfK2ZeXJrsvKH2s6T/c X-Google-Smtp-Source: APXvYqyzlJq8HvAuOl0wYnJ9cP/t2vfAtCgB4LU2BUdxiQsUtmE7LIiOmm2jGNy6ZSmeiYG5MvBr+g== X-Received: by 2002:a5d:6550:: with SMTP id z16mr6773147wrv.66.1574292163592; Wed, 20 Nov 2019 15:22:43 -0800 (PST) Original-Received: from [192.168.0.5] ([212.50.117.215]) by smtp.googlemail.com with ESMTPSA id r2sm867567wma.44.2019.11.20.15.22.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Nov 2019 15:22:42 -0800 (PST) In-Reply-To: <87ftjarzuh.fsf@gnus.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:172085 Archived-At: On 30.10.2019 17:56, Lars Ingebrigtsen wrote: > I'm unable to reproduce this bug on the current trunk. Has this been > fixed in the three years since it was reported? I think it's still there as a possibility, but the odds of triggering it are becoming more rare with each year. Looking at the backtrace, it requires a major mode that uses font-lock-syntactic-keywords and calls syntax-propertize-via-font-lock to set its syntax-propertize-function. Since Emacs 26 (where the bug still reproduces), ada-mode has both switched to a proper syntax-propertize-function instead of the one mentioned above and moved out of Emacs core, so "mode: ada" isn't doing anything in 'emacs -Q'. So the repro scenario is like this now: (define-derived-mode foo-mode fundamental-mode "Foo" (setq-local syntax-propertize-function (syntax-propertize-via-font-lock nil))) (with-temp-buffer (insert "-- -*- mode: foo -*-") (delay-mode-hooks (set-auto-mode)) (syntax-propertize (point))) The resulting backtrace: Debugger entered--Lisp error: (error "Font-lock trying to use keywords before setting th...") signal(error ("Font-lock trying to use keywords before setting th...")) error("Font-lock trying to use keywords before setting th...") font-lock-compile-keywords(nil t) font-lock-fontify-syntactic-keywords-region(1 21) #f(compiled-function (start end) #)(1 21) syntax-propertize(21) Considering font-lock-syntactic-keywords are obsolete since Emacs 24, this is not very important, and people should feel free to close this if a fix is not found soon.