[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] Fun with syntax tables

From: David Kastrup
Subject: Re: [AUCTeX-devel] Fun with syntax tables
Date: Thu, 21 Jul 2005 21:59:53 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Ralf Angeli <address@hidden> writes:

> Suppose you have line like
> foo \verb|bar| baz
> in a LaTeX buffer.  font-latex puts syntax properties (string quote
> syntax) onto the | characters which then get picked up by
> `font-lock-fontify-syntactically-region'.  This happens with help of
> `parse-partial-sexp'.
> This is fine in LaTeX mode, but fails in documentation parts of docTeX
> mode.  There the line would look like this:
> % foo \verb|bar| baz
> That means with a comment starter at the front.
> The problem is that with % as the comment start and \n as the comment
> end `parse-partial-sexp' won't find the stuff marked with string quote
> syntax inside of the comment.  Here is an example:


> If you execute it, it should return 13 which is the end of the line.
> If you remove the % character from the inserted string it will return
> 8 which is the position just after the second | character.
> Can anybody tell me how to make the string quote stuff visible for
> `parse-partial-sexp'?

Well, there are some variables that mildly sound like they could be

#1 would be
  Variable: Non-nil means `forward-sexp', etc., should treat comments as 
  Plist: standard-value variable-documentation

Some others of possible relevance:

  Variable: Non-nil means that the global syntactic context is used.
  Plist: variable-documentation
  Variable: Non-nil if syntax-tables can be used instead of regexps.
  Plist: variable-documentation

  Variable: If non-nil, Font Lock mode uses this instead of `comment-end'.
  Plist: variable-documentation
  Variable: Regexp to match the start of a comment.
  Plist: variable-documentation
  Variable: If non-nil, Font Lock mode uses this instead of 
  Plist: variable-documentation

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]