On Sun, Nov 24, 2024 at 02:53:17PM +0200, Eli Zaretskii wrote:
> > Is it worth having both options for syntax highlighting for source-highlight
> > in case an example changes something for later examples?  I do not know
> > anything about how source-highlight works, so it may not be a problem,
> > but imagine the hypothetical situation of a language where you could define
> > new operators or change the string quotation syntax.
> 
> source-highlight allows installation of language definition files in
> $prefix/share/source-highlight, see the *.lang files there.  The
> format is documented in the Info manual that comes with
> source-highlight.

Thanks.  I imagine that if the user's document had the same language
in different examples (e.g. TeX), but that it had to be highlighted
differently for the same language in different examples (e.g. TeX
with different catcodes, e.g. using @ to introduce control sequences
rather than \), then the user would mark these different examples
with a different keyword on the @example command line:

@example tex
\hbox@{foo@}
@end example

@example tex-escape-is-at
@@hbox@{foo@}
@end example

Then the user would provide a different *.lang file for the two types
of example.

Reply via email to