unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* When is a syntax-propertize-function called when parse-sexp-lookup-properties is t for a current buffer?
@ 2021-10-05  3:54 Pierre Rouleau
  2021-10-05  4:15 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-10-05 12:54 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 2 replies; 16+ messages in thread
From: Pierre Rouleau @ 2021-10-05  3:54 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-10-06  2:46 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-05  3:54 When is a syntax-propertize-function called when parse-sexp-lookup-properties is t for a current buffer? Pierre Rouleau
2021-10-05  4:15 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-05 12:00   ` Pierre Rouleau
2021-10-05 12:54 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-10-05 13:48   ` Pierre Rouleau
2021-10-05 14:57     ` Stefan Monnier
2021-10-05 15:36       ` Pierre Rouleau
2021-10-05 17:29         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-05 18:45           ` Pierre Rouleau
2021-10-05 19:08             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-05 19:42               ` Pierre Rouleau
2021-10-05 19:41         ` Stefan Monnier
     [not found]           ` <CALTqLiab4AZx=fn1wX1ovckxFtie9C20O=qZFYTLyQNKWfWZGg@mail.gmail.com>
2021-10-05 20:05             ` Fwd: " Pierre Rouleau
2021-10-05 20:17           ` Pierre Rouleau
2021-10-06  1:55             ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-10-06  2:46               ` Pierre Rouleau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).