[climacs-devel] keyboard macros, display protocol

Nikodemus Siivola nikodemus at random-state.net
Sun May 7 21:38:19 UTC 2006


Christophe Rhodes <csr21 at cam.ac.uk> writes:

> Whether or not you're missing something, there are multiple clients
> for an up to date syntax, and they have different needs; we start from
> the observation that doing a complete parse of the entire buffer at
> every keystroke (or even more often: again, consider keyboard macros)
> is not acceptable in terms of performance for arbitrary grammar.
> Therefore, there cannot be a general automagic system that ensures
> that the syntax is sufficiently up to date for a given command to
> operate correctly.  (Stop me there if there's something you want to
> disagree with).

No disagreement, just couple of questions:

1. Can there be a magic mechanism to answer questions like "does X have
   an up to date syntax?", where X is a semi-arbitrary position indicator,
   including things like line J, column K, and "end of current toplevel
   form"? 

   I'm sort of assuming that this is not a reasonable thing to have (or
   at least not something you'd want to invoke continuously), but I've
   no idea really.

2. What is a "client" here? (a) Is part of the syntax that answers queries about
   the syntax a client? (b) Is a function that uses these queries in order to
   implement some syntax-aware motion a client? (c) Is a command that uses that
   function a client? (d) Is a mode that includes that command a client?

> Since only each individual client of a syntax knows how much of the
> syntax needs to be up to date (and there we will need to extend the
> current support, so that it is reasonable to say "please update the
> syntax until you find the end of this top-level form" or similar), the
> logical place to put the calls to extend the up-to-date syntax region
> is where they're needed.

What I'm getting at here is, that is it unreasonable to have the parts
that answer questions like "where is the end of this top-level form?"
take care of also updating the syntax so that they can give the
correct answer?

Cheers,

  -- Nikodemus              Schemer: "Buddha is small, clean, and serious."
                   Lispnik: "Buddha is big, has hairy armpits, and laughs."



More information about the climacs-devel mailing list