tildify-foreach-ignore-environments

tildify-foreach-ignore-environments is a compiled Lisp function in `tildify.el'.

(tildify-foreach-ignore-environments PAIRS CALLBACK BEG END)

Outside of environments defined by PAIRS call CALLBACK.

PAIRS is a list of (BEG-REGEX . END-REGEX) cons. BEG-REGEX is a regexp matching
beginning of a text part to be skipped. END-REGEX defines end of the
corresponding text part and can be either:
- a regexp matching the end of the skipped text part
- a list of regexps and numbers, which will compose the ending regexp by
concatenating themselves, while replacing the numbers with corresponding
subexpressions of BEG-REGEX (this is used to solve cases like
\\verb<character> in TeX).

CALLBACK is a function accepting two arguments -- REG-BEG and REG-END -- that
will be called for portions of the buffer outside of the environments defined by
PAIRS regexes.

The function will return as soon as CALLBACK returns nil or point goes past END.
CALLBACK may be called on portions of the buffer outside of [BEG END); in fact
BEG argument is ignored.

This function is meant to be used to set `tildify-foreach-region-function'
variable. For example, for an XML file one might use:
(setq-local tildify-foreach-region-function
(apply-partially 'tildify-foreach-ignore-environments
'(("<! *--" . "-- *>") ("<" . ">"))))