emacs-devel
[Top][All Lists]
Advanced

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

Re: Syntax ambiguities in narrowed buffers and multiple major modes: a p


From: Tom Tromey
Subject: Re: Syntax ambiguities in narrowed buffers and multiple major modes: a proposed solution.
Date: Sat, 04 Mar 2017 12:41:23 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

>>>>> "Alan" == Alan Mackenzie <address@hidden> writes:

Alan>   o - Each time parse-partial-sexp encounters an island open, it pushes
Alan>     the current state, including the syntax table, onto this stack,
Alan>     reinitialises the state, and optionally sets the syntax table, for
Alan>     the island just being opened.  The island begins at the buffer
Alan>     position _after_ the one bearing the island open syntax.

This approach means that an island can't start at the beginning of a
buffer.  I don't have an example offhand where this matters, but it
seems like an arbitrary restriction, and furthermore one not imposed by
the current approach of having syntax table property on the affected
characters.  Maybe an island could be delimited in this same way, that
is, an island would be a contiguous group of characters that have a
property ('island, or whatever) with the same value.

Alan>   o - A new function would be needed to get the "base" syntax of a
Alan>     position, the syntax it would have if it weren't for any island
Alan>     open/close syntax table properties on it.

Would you mind giving an example of what this would be used for?

Tom



reply via email to

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