all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: Syntax ambiguities in narrowed buffers and multiple major modes: a proposed solution.
Date: Sat, 04 Mar 2017 12:41:23 -0700	[thread overview]
Message-ID: <87y3wkj0d8.fsf@tromey.com> (raw)
In-Reply-To: <20170225135355.GA2592@acm> (Alan Mackenzie's message of "Sat, 25 Feb 2017 13:53:56 +0000")

>>>>> "Alan" == Alan Mackenzie <acm@muc.de> 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



  parent reply	other threads:[~2017-03-04 19:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-25 13:53 Syntax ambiguities in narrowed buffers and multiple major modes: a proposed solution Alan Mackenzie
2017-02-25 19:42 ` Stefan Monnier
2017-02-25 21:22   ` Alan Mackenzie
2017-02-26  2:32     ` Stefan Monnier
2017-02-26 12:06       ` Alan Mackenzie
2017-02-26 12:24         ` Yuri Khan
2017-02-26 16:10           ` Alan Mackenzie
2017-02-26 13:47         ` Stefan Monnier
2017-02-26 16:37           ` Alan Mackenzie
2017-02-27  4:05             ` Stefan Monnier
2017-02-27 19:05               ` Alan Mackenzie
2017-02-27 20:52                 ` Stefan Monnier
2017-02-27 23:22                   ` Stefan Monnier
2017-02-27 23:48                     ` Dmitry Gutov
2017-02-28 18:58                   ` Alan Mackenzie
2017-02-28 19:09                     ` Stefan Monnier
2017-02-28 20:27                       ` Alan Mackenzie
2017-03-02 22:28                         ` Alan Mackenzie
2017-03-03 12:47 ` Filipp Gunbin
2017-03-04 19:41 ` Tom Tromey [this message]
2017-03-24 23:41   ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y3wkj0d8.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.