Font locking of LaTeX constructs for specifying verbatim content is
done with syntactic keywords in AUCTeX. There are two features in GNU
Emacs which AUCTeX relies upon and which are not present in XEmacs:
1) The syntax class "generic string delimiter"
The manual describes it like this:
A "generic string delimiter" (designated by `|') starts or ends
a string. This class differs from the string quote class in
that _any_ generic string delimiter can match any other generic
string delimiter; but they do not match ordinary string quote
characters.
This syntax class is primarily meant for use with the
`syntax-table' text property (*note Syntax Properties::). You
can mark any range of characters as forming a string constant,
by giving the first and last characters of the range
`syntax-table' properties identifying them as generic string
delimiters.
For AUCTeX this means that it is possible to place syntax
properties at the opening and closing braces of LaTeX constructs
like "\verb{foo}" which get recognized correctly by functions
like `parse-partial-sexp'.
With the normal string quote syntax class it seems that the start
and end will only be matched if they are the same characters,
e.g. as in "\verb{foo{". I am not sure if I got it all right but
at least the following testcase is not working, i.e. the second
call to `parse-partial-sexp' will not find the closing brace and
point will end up at the end of the buffer:
(with-temp-buffer
(insert "foo {bar} baz")
(put-text-property 5 6 'syntax-table '(7))
(put-text-property 9 10 'syntax-table '(7))
(goto-char (point-min))
(set (make-local-variable 'lookup-syntax-properties) t)
(let ((old-state (parse-partial-sexp (point-min) (point-max)
nil nil nil 'syntax-table)))
(parse-partial-sexp (point) (point-max)
nil nil old-state 'syntax-table))
(point))
If you change "foo {bar} baz" to "foo {bar{ baz" it will work.
BTW, it doesn't make a difference if one uses '(7 . ?}) and '(7 .
?{) instead of '(7) as the syntax property.
2) The possibility to plug in one's own syntactic face function
In GNU Emacs one can specify a function for deciding which face a
match during syntactic fontification gets. One has to map
`font-lock-syntactic-face-function' to this function.
Here is its doc string of the latter:
Function to determine which face to use when fontifying
syntactically. The function is called with a single parameter
(the state as returned by `parse-partial-sexp' at the beginning
of the region to highlight) and should return a face.
In AUCTeX it is used to decide if a match should get a comment,
math or verbatim face.
I don't know if these features are used by any other Elisp packages
out there but at least for AUCTeX it would mean that fontification of
verbatim constructs will work in XEmacs.
--
Ralf