From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.bugs Subject: bug#24749: Making sure syntax-propertize is called Date: Wed, 05 Jun 2019 07:25:17 +0200 Message-ID: <87r288d2o2.fsf@gmail.com> References: <87ef4awyb6.fsf@gmail.com> <87sgsqwjxp.fsf@gmail.com> <87o93dx5lp.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="211049"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 24749@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 05 07:26:19 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.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hYORG-000sna-F4 for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Jun 2019 07:26:18 +0200 Original-Received: from localhost ([127.0.0.1]:35624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYORE-0005E5-NV for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Jun 2019 01:26:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYOR0-0005CP-Uq for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2019 01:26:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYOR0-0005kV-0N for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2019 01:26:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60945) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hYOQz-0005kI-T1 for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2019 01:26:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hYOQz-0002wy-MM for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2019 01:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vitalie Spinu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Jun 2019 05:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24749 X-GNU-PR-Package: emacs Original-Received: via spool by 24749-submit@debbugs.gnu.org id=B24749.155971233011303 (code B ref 24749); Wed, 05 Jun 2019 05:26:01 +0000 Original-Received: (at 24749) by debbugs.gnu.org; 5 Jun 2019 05:25:30 +0000 Original-Received: from localhost ([127.0.0.1]:46256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYOQT-0002wE-UX for submit@debbugs.gnu.org; Wed, 05 Jun 2019 01:25:30 -0400 Original-Received: from mail-ed1-f41.google.com ([209.85.208.41]:45544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYOQR-0002w0-OU for 24749@debbugs.gnu.org; Wed, 05 Jun 2019 01:25:28 -0400 Original-Received: by mail-ed1-f41.google.com with SMTP id f20so3860451edt.12 for <24749@debbugs.gnu.org>; Tue, 04 Jun 2019 22:25:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=5LKm5ySPldt8UaoClWYQ0Mtw5WjsO0AavjQNwelNkB0=; b=sFyYsQBcy5hwPFXFJd7dPhocFG535l0GXFSnA9GojR33uILiwvlLGY+T9qMa2fTz6y 8VaIsyLcdbqWpouJ1bhoc+X2DhD2aMRK3LYiHkoVwLqcr+pNIFZ3d5X3MPy6QvoxFC6O GZUXUsJhMCqoOOX0BMT1LsyxQmcdsifsnLL7PqUszuuZrs9oKR7GVQgs5i+54o0a2ucC iIkB4zfJeFqmQfLIAxlt05m8Hmrkz2/k4ojK+5RDGzjWw4JIHBXYCqCKQLEvoypz2cdo a2GXupVcq5YRzbGEz5yNo+l5safGZCH/KWHBpQ0WKfHb6iglo+5Rth5k9C87jyCqv70r 6hxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=5LKm5ySPldt8UaoClWYQ0Mtw5WjsO0AavjQNwelNkB0=; b=KkVSnsdMU+Yl1giX4CZm/iWvHhlQ2ZpBwGsRJaJfth4yHJV3EeqAE/mxqEqK97YSXe Ow992trZzcuNui/yqYbUhWHKHmWT1Vig3OGc8Bcqxm5XG74PrlaQBhNDs5K7MxXHPh8Y exdsHgwk+I1WlMicHFv+OMzYuP1J2orX128NLh+5RIdGgnyBLhdrGBllceQY84JJvb9m W5NjB4wtuL/SXHY0L2pBwQk159IlZIVUKiid/kIyTBukJs6Ls0Xx4IDEKRKHsUDfpByk B4nq4Vj8U0QNmxbhMiW/PHPeqeMENnnA9b47U6kaIL8C1HzU9pOvN8Jzbv/wNNQvoc4t rBsw== X-Gm-Message-State: APjAAAUQsaVWZjv9a5S2AY+jCCloCtE8PsDJ0CZcA+gT7EE8jkUf39tT sjiL6GP75EaNEpaEVFOZNp8= X-Google-Smtp-Source: APXvYqyyXR1D7x45Gm+i11N8Glea5ruc4G9hSDlRk3b2MAAyn8N661IcV/PyQXjNvlGQ08eRLMEcPQ== X-Received: by 2002:a17:906:5159:: with SMTP id s25mr13313235ejl.16.1559712319557; Tue, 04 Jun 2019 22:25:19 -0700 (PDT) Original-Received: from localhost (2001-1c00-0a17-1300-ec5d-7b0c-b812-9602.cable.dynamic.v6.ziggo.nl. [2001:1c00:a17:1300:ec5d:7b0c:b812:9602]) by smtp.gmail.com with ESMTPSA id i24sm3558155ejc.50.2019.06.04.22.25.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2019 22:25:18 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 04 Jun 2019 09:08:53 -0400") 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:160137 Archived-At: >> On Tue, Jun 04 2019 09:08, Stefan Monnier wrote: >> I am setting it to nil while searching for mode boundaries in >> polymode. First, it doesn't make sense to use local syntax tables in >> search because different inner modes might have a different opinion of >> syntax. > That also means that the regexps you use there presumably don't use > syntax-dependent constructs like \s?, \<, and friends, right? Ideally yes, but I cannot control for what users use. To be frank I was not even paying attention to this in my own regexps so far. I think constructs like \\w or \\s- are pretty common. >> Second, I don't want to trigger syntax-propertize for performance reasons. >> The bounds of the forward search is normally eob and that would mean >> syntax-propertizing the entire buffer on every mode boundary lookup. > If your regexp doesn't use syntax-dependent constructs, then the regexp > search shouldn't call syntax-propertize, Good to know. I was not aware of this. Relatedly, I just noticed that seemingly innocuous dabrev-expand (hippie-expand) trigger syntax-propertize for the entire buffer. In large buffers, especially if you have several of these, the delay is noticeable. > IIRC (and similarly, syntax-propertize wouldn't be applied to the whole buffer > if a match is found before EOB). In the multi-mode context some types of chunks might not be present in the buffer, and the rare ones are commonly not. So the search ends up at eob. Vitalie