opensubscriber
   Find in this group all groups
 
Unknown more information…

e : emacs-devel@gnu.org 19 June 2012 • 11:09AM -0400

Re: web-mode.el
by Stefan Monnier

REPLY TO AUTHOR
 
REPLY TO GROUP




> compatibility. From what I understand, `widen' is used to counteract the
> situation when a user calls `narrow-to-region' interactively.

Yes, and that is a problem that needs fixing: as mentioned elsewhere on
emacs-devel several months (years?) ago, Emacs needs to distinguish
between "narrow as a way to make the rest invisible" and "narrow to
pretend the rest doesn't exist at all".  C-x n n does the first, while
the second was used by Rmail, is used by Info, and could be used by
a multi-major-mode.

> It occurs to me that, once the supported interface is established,
> introducing new syntax-table value becomes not strictly necessary because,
> for example, a version of Lennart's `with-chunks' macro can be implemented
> in Lisp by applying whitespace or comment-starter/ender syntax to foreign
> chunks around the body calls (idea from mmm-noweb).
> Is that right?

That's right as long as you're willing to dynamically modify the buffer
(with syntax-table text-properties) every time you move from one chunk
to another.

If you have many chunks, that can be a problem.  This can happen if you
push the idea of multi-major-mode a bit further and consider for example
that comments and strings are really "text-mode chunks" embedded in
"some other mode chunks".


        Stefan


Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.