Variable: syntax-propertize-extend-region-functions

syntax-propertize-extend-region-functions is a buffer-local variable defined in syntax.el.gz.

Documentation

Special hook run just before proceeding to propertize a region.

This is used to allow major modes to help syntax-propertize find safe buffer positions as beginning and end of the propertized region. Its most common use is to solve the problem of /identification/ of multiline elements by providing a function that tries to find such elements and move the boundaries such that they do not fall in the middle of one. Each function is called with two arguments (START and END) and it should return either a cons (NEW-START . NEW-END) or nil if no adjustment should be made. These functions are run in turn repeatedly until they all return nil. Put first the functions more likely to cause a change and cheaper to compute.

View in manual

Probably introduced at or before Emacs version 24.1.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/syntax.el.gz
(defvar-local syntax-propertize-extend-region-functions
  '(syntax-propertize-wholelines)
  "Special hook run just before proceeding to propertize a region.
This is used to allow major modes to help `syntax-propertize' find safe buffer
positions as beginning and end of the propertized region.  Its most common use
is to solve the problem of /identification/ of multiline elements by providing
a function that tries to find such elements and move the boundaries such that
they do not fall in the middle of one.
Each function is called with two arguments (START and END) and it should return
either a cons (NEW-START . NEW-END) or nil if no adjustment should be made.
These functions are run in turn repeatedly until they all return nil.
Put first the functions more likely to cause a change and cheaper to compute.")