emacs-devel
[Top][All Lists]
Advanced

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

Re: C Mode: acceleration in brace deserts.


From: Lennart Borgman
Subject: Re: C Mode: acceleration in brace deserts.
Date: Sat, 5 Dec 2009 03:11:22 +0100

Hi Alan,

>> Is there a set of guidelines anywhere as to how to make a mode
>> MuMaMoable?
>
>
> For parsers: No.


Since we do not have the low level routines now here is an idea to get
things working now:

- Maybe use syntax-ppss. It will cache the information and MuMaMo has
support for making this per chunk + major mode. This is needed instead
of directly calling (parse-partial-sexp 0 to).

- Instead of just calling (widen) call a function hold in a variable.
The inital value for this should of course be the function symbol
'widen. This will allow MuMaMo to restrict (widen) to just the current
mumamo chunk and that is probably what you want when parsing. That
function will then narrow the buffer instead of widening it most of
the time. You could then use it to get the boundaries for the mumamo
chunk at point to if you want to.

But maybe that restricted (widen) is not sufficient? Maybe you have to
somehow jump back to the previous mumamo chunk with your major mode?
How would you want to do that in that case? (I suggest just another
variable holding a function that will give you the end point of the
prev mumamo chunk or nil if there is none. This should variable should
of course be nil by default.)




reply via email to

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