From: Lennart Borgman <lennart.borgman@gmail.com>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: C Mode: acceleration in brace deserts.
Date: Sat, 5 Dec 2009 03:11:22 +0100 [thread overview]
Message-ID: <e01d8a50912041811q2de427a3o6ad0d6910fe1e4fe@mail.gmail.com> (raw)
In-Reply-To: <e01d8a50912041103o4105b99ctd48048b3dca3f2db@mail.gmail.com>
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.)
next prev parent reply other threads:[~2009-12-05 2:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-03 16:21 C Mode: acceleration in brace deserts Alan Mackenzie
2009-12-03 16:26 ` Lennart Borgman
2009-12-03 16:59 ` Alan Mackenzie
2009-12-03 17:22 ` Lennart Borgman
2009-12-03 19:39 ` Alan Mackenzie
2009-12-03 19:57 ` Lennart Borgman
2009-12-04 10:34 ` Lennart Borgman
2009-12-04 11:03 ` Lennart Borgman
2009-12-04 11:56 ` Alan Mackenzie
2009-12-04 12:03 ` Lennart Borgman
2009-12-04 12:18 ` Lennart Borgman
2009-12-04 13:54 ` Alan Mackenzie
2009-12-04 19:03 ` Lennart Borgman
2009-12-05 2:11 ` Lennart Borgman [this message]
2009-12-05 4:49 ` Stefan Monnier
2009-12-04 5:31 ` Richard Stallman
2009-12-04 11:37 ` Alan Mackenzie
2009-12-05 6:50 ` Richard Stallman
2009-12-03 17:09 ` Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e01d8a50912041811q2de427a3o6ad0d6910fe1e4fe@mail.gmail.com \
--to=lennart.borgman@gmail.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).