emacs-devel
[Top][All Lists]
Advanced

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

Re: Multiple major modes


From: Lennart Borgman (gmail)
Subject: Re: Multiple major modes
Date: Tue, 12 Jun 2007 23:04:50 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666

Eric M. Ludlam wrote:
  [ ... ]
"Lennart Borgman (gmail)" <address@hidden> seems to think that:
Stefan Monnier wrote:
and something that should be addressed without imposing restrictions on
specialized major modes.
Actually, I think that in order to address it well, we will need to impose
restrictions on major modes (though only on the ones involved in
multiple-major-mode buffers) and maybe also on minor modes.

My parsing tool (semantic, referenced earlier) solved some problems w/
lots of mode-specific configurations via 'mode-local' variables and
methods.  David Ponce wrote this, and suggested it here once before.
I don't recall what the end resolution was on it.

A multi-mode style thing would likely be simplified if key behaviors
were all defined via mode-local configurations, as that would allow
the multi-mode manager to get a complete query list of all
configuration differences without running the major-mode function.

http://cedet.cvs.sourceforge.net/cedet/cedet/common/mode-local.el?view=log

Would it be possible to catch all local bindings by setting the major mode in a temporary buffer and then save them for later use? This would avoid having to change major modes, perhaps.

This tools has a spiff macro `with-mode-local', which lets you run a
bunch of code as if some other mode were active.  This is used in our
grammar file so we can operate on grammar syntax w/ lisp syntax mixed
in.  We can also operate on tags from other buffers by momentarily
using features of the originating major-mode.

Enjoy
Eric





reply via email to

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