syntax-propertize-function

syntax-propertize-function is a variable defined in `syntax.el'.
Its value is
nil

  • This variable may be risky if used as a file-local variable.

Documentation:
Mode-specific function to apply `syntax-table' text properties.
It is the work horse of `syntax-propertize', which is called by things like
Font-Lock and indentation.

It is given two arguments, START and END: the start and end of the text to
which `syntax-table' might need to be applied. Major modes can use this to
override the buffer's syntax table for special syntactic constructs that
cannot be handled just by the buffer's syntax-table.

The specified function may call `syntax-ppss' on any position
before END, but it should not call `syntax-ppss-flush-cache',
which means that it should not call `syntax-ppss' on some
position and later modify the buffer on some earlier position.