From: Richard Stallman <rms@gnu.org>
Cc: lennart.borgman.073@student.lu.se, shulman@math.uchicago.edu,
emacs-devel@gnu.org
Subject: Re: PHP mode and mmm-mode
Date: Sun, 31 Dec 2006 21:11:08 -0500 [thread overview]
Message-ID: <E1H1Cdo-0000UE-3c@fencepost.gnu.org> (raw)
In-Reply-To: <m3iroo5fxr.fsf@quimbies.gnus.org> (message from Lars Magne Ingebrigtsen on Tue, 02 May 2006 22:29:04 +0200)
I am going through the old mail that I failed to deal with during the
past year. Please forgive me for taking so long to respond.
I just had a gross idea. Before calling any of the major-mode
functions (in response to, say, `TAB'), you'd make all the text that's
not in the current major mode invisible and intangible. Then each
major mode function would believe there was nothing but its own type
of text in the buffer.
This is an interesting idea, but I think it won't work unless we rewrite
major modes specifically to work with it.
Making it invisible is pointless since it would only affect
redisplay.
Making it intangible would stop point from staying inside it. That
could influence the various major modes. But I don't think it would
influence them enough. The classic case of mixing two languages is
Bison input.
Would making everything except the C code intangible cause the C code
to be handled and indented properly by CC mode? I tend to think the
answer is no, but you could try it easily and see.
> Perhaps an approach based on narrowing, or the creation of auxiliary
> buffers, might work better; I haven't really explored these
> possibilities.
I think using narrowing and auxiliary buffers would both be less than
optimal. When you program, you need to see the context.
I agree with you that that isn't likely to work.
Perhaps we could have a text property `language' and a variable
`current-language'. If the `language' property of a character doesn't
equal the value of `current-language', then the character would be
treated syntactically as whitespace in syntax.c, and ignored _in the
appropriate way_ by various other primitives.
prev parent reply other threads:[~2007-01-01 2:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-02 4:24 PHP mode and mmm-mode Michael Shulman
2006-05-02 8:10 ` martin rudalics
2006-05-02 14:57 ` Stefan Monnier
2006-05-02 20:29 ` Lars Magne Ingebrigtsen
2006-05-02 23:44 ` Nic
2006-05-03 3:11 ` David Hansen
2006-05-03 3:43 ` Stefan Monnier
2007-01-01 2:11 ` Richard Stallman [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1H1Cdo-0000UE-3c@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=lennart.borgman.073@student.lu.se \
--cc=shulman@math.uchicago.edu \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.