emacs-devel
[Top][All Lists]
Advanced

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

Re: A vision for multiple major modes [was: Re: [Emacs-diffs] widen-limi


From: Phillip Lord
Subject: Re: A vision for multiple major modes [was: Re: [Emacs-diffs] widen-limits c331b66:]
Date: Fri, 25 Mar 2016 18:20:09 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Alan Mackenzie <address@hidden> writes:

>> I proposed (4) very early in the thread, but didn't hear much support for
>> it. There are only three trivial usages of Fwiden in C code. Bringing 
>> `narrow`
>> to elisp is equally easy.
>
> All these options strike me as artificial, ad hoc, and ugly.  I would go
> for option number (5) - to transcend the "unwanted widen" problem - to
> enhance Emacs such that users and Lisp hackers can freely narrow and
> widen _without_ upsetting the @dfn{super mode} (the multiple mode
> handling mode).
>
> What is a major mode?  It is a collection of local variable settings, a
> syntax table, an abbreviation table, a mode specific key map, font lock
> mode settings, an indentation engine, Imenu settings, and one or two
> other things.

And a visualisation of all of the above. It's also an assumption that
it's unique in a buffer. And, it's not really the above, because you can
change any of these values in an individual buffer, even if it stays in
the same mode. So, more a major mode is a mechanism for setting all of
the above.

> Although the above vision implies a lot of development work, there is
> nothing there which is beyond our abilities to implement readily.  It
> would give us a true multi major mode capability, yet the impact on
> individual major modes would be minimal.

We already have a mechanism to seperate and make instances of all the
things that you speak out above -- it's called a new buffer; the most
sensible way, then, is to have multiple modes is, surely, to have
multiple buffers.

Phil



reply via email to

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