emacs-devel
[Top][All Lists]
Advanced

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

Re: Writing syntax-propertize-function for strings in code in strings, e


From: Stefan Monnier
Subject: Re: Writing syntax-propertize-function for strings in code in strings, etc
Date: Fri, 26 Oct 2012 16:41:56 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

>> Yes, one "push <inner-syntax-table>" and one "pop".
> So, I don't see the usefulness of the <inner-syntax-table> value in the
> simple case of embedding code in the same language.

It's for the other cases: strings with strings and comments within strings.

> Unless we're doing something like the "multiple-modes" use case, which we
> discussed in another thread.

Yes, it potentially could be used for m-m-m, tho it would only be
a piece of the puzzle (and it's not clear how useful that piece would be
in the end, once we have the whole puzzle).

>> Of course, this is fine for parse-partial-sexp, but it's a different
>> matter for backward-sexp, where the "pop" would also need to know the
>> <inner-syntax-table>.
> Maybe in the latter case the scanning function, when encountering the "pop"
> syntax property, would just skip ahead until it finds the corresponding
> "push"?

Without knowing the inner syntax table, it's pretty difficult to know
what can be skipped (unless we assume that the "push" can only be marked
with a `syntax-table' text-property).

> Unless we want to support intersecting subregions, like ([{])}.

No, I don't think we have much hope to support that at this stage.


        Stefan



reply via email to

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