[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

When is a syntax-propertize-function called when parse-sexp-lookup-prope

From: Pierre Rouleau
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


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

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
     ("\\(<\\)<" (1 "(>"))
     (">\\(>\\)" (2 ")<")))
    "Syntax properties to activate << >> pairing.")
  (setq-local parse-sexp-lookup-properties t)
  (setq-local 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
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?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]