From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pierre Rouleau Newsgroups: gmane.emacs.help Subject: When is a syntax-propertize-function called when parse-sexp-lookup-properties is t for a current buffer? Date: Mon, 4 Oct 2021 23:54:23 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19242"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 05 05:55:03 2021 Return-path: Envelope-to: geh-help-gnu-emacs@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 1mXbXj-0004lY-QR for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 05 Oct 2021 05:55:03 +0200 Original-Received: from localhost ([::1]:41168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXbXh-0004JZ-FZ for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 04 Oct 2021 23:55:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXbXL-0004JA-9l for help-gnu-emacs@gnu.org; Mon, 04 Oct 2021 23:54:39 -0400 Original-Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:33648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXbXJ-0001JY-Nk for help-gnu-emacs@gnu.org; Mon, 04 Oct 2021 23:54:39 -0400 Original-Received: by mail-ed1-x52a.google.com with SMTP id p13so44920936edw.0 for ; Mon, 04 Oct 2021 20:54:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=AkVG17/TIhjeDtljdshQfvmcSAn+Wp0qhJhu/HD5vGs=; b=CYrq3CARzS9XqYepOmQOc+Fl51lSM5r74lhzxkVS99tHxGQNintwwaLEBQkhaIjQ8N ghby+5T/kQ+XLGrk49QgWWXypr/1Z9KJkL0POuXusB62R98Ly1582ZUHCBPIlLOdgpfs KEi84n1GORZBERmilsJF4ySXKorjOaVxdWnGvFy/NGq7wlSuMvF9bUhl8rtyK/P3MUJ1 hCJMsi6WQNMUXvWI5Ga6Dp5v2X08ksOn6fF6BvmAmxBB0t3E+YLIKqjUiGlgSBHsfSQd WVMejLHkl35XycBtRjqLkzMlCb37fQSyqegc57vw+9NgMwWLpgc6/1ekMq2bfn6dTCUD k1aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=AkVG17/TIhjeDtljdshQfvmcSAn+Wp0qhJhu/HD5vGs=; b=vLfneoojVRL9fmo0g0fKB1/QYZ/3zYA4l34b1LCGAlv7p48UaPxPyJljvNjfOkcx0K Iu6qaLnbdPr/tXFdaOf8AE3i3rLMMipGHskAVI/X7wTsOlTcinl8IC1LE9HUriL/3it0 INgmAHkcGHEiCDfIXJLwlgMVsSvXT/MoqZv69lu2BsTJuaGB6jmLJGXoTBa5XbIY1UCu H0zY5gOpOKRAc0KCutvp90yaup1KZN+BdqQvEWdkrA8KmiMHJe+jY28HPW09GIakVqHp gK7RxzN0IEVl7O63lxI8fU8F/JOUQqvs5rHIltPTobI7yrYASJ75KqYZ/fs+Sj4T3F67 2pOw== X-Gm-Message-State: AOAM531xFfSixadWSg5lx6932AhE0PKiP1mimaL36wYcrwdTfTh53MDA em5NFY5kWVGHnI307+ByxUgs2XNgeLcPWse7w09/Aiquo7E= X-Google-Smtp-Source: ABdhPJyniInyvFUZaoP20/uR8IqVt1psnTKUYwfqeMflPlBxGOwJ4+ulozHzsNSYpaJuzMBvjo74fwH6DMVgicRrwms= X-Received: by 2002:a17:906:789:: with SMTP id l9mr18085896ejc.61.1633406074710; Mon, 04 Oct 2021 20:54:34 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=prouleau001@gmail.com; helo=mail-ed1-x52a.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:133547 Archived-At: Hi I'm trying to modify the behaviour of erlang.el erlang-mode wrt. the handling of binaries in order to get forward-sexp and friends to handle << >> pair matching. I have been trying to add something like the following in the code and also trying to put embedded message calls or even error calls to be able to see when the function gets called. So far I did not see it called. ``` lisp (defconst erlang-mode-syntax-propertize-function (syntax-propertize-rules ("\\(<\\)<" (1 "(>")) (">\\(>\\)" (2 ")<"))) "Syntax properties to activate << >> pairing.") (setq-local parse-sexp-lookup-properties t) (setq-local syntax-propertize-function erlang-mode-syntax-propertize-function) ``` I most probably don't understand the mechanism. I expanded the macro above to see the generated code which makes sense, and read all I could find on Emacs syntax properties, text properties, stickiness, etc.. What I'd like to understand is what calls the generated function, providing it the 2 arguments (start & end) and when should it be called. Are these calls protected against error so I can't see them if they occur? Thanks /Pierre -- /Pierre