From: Tim Johnson <tim@johnsons-web.com>
Subject: Re: mode for a region?
Date: Sun, 27 Nov 2005 22:17:24 -0000 [thread overview]
Message-ID: <slrndok1jh.3hh.tim@linus.johnson.com> (raw)
In-Reply-To: mailman.16951.1133116592.20277.help-gnu-emacs@gnu.org
On 2005-11-27, Drew Adams <drew.adams@oracle.com> wrote:
> Some languages provide for using expressions of another language within
> them. Some syntactic method is used to identify the other-language
> expression.
>
> For example, you might have a SQL expression that uses SQL function
> XMLQuery, which takes a (quoted) XQuery expression as an argument. SQL and
> XQuery are different languages, with radically different syntaxes. Another
> example would be Prolog expressions within Lisp (or vice versa). There are
> many languages that let you pass an expression to another language.
Vim does this quite well with Javascript in HTML documents. I can
check up on this, since I am moderately familiar with vim. In fact
the <script> </script> syntax provides a delimiters which the editor
The same could go for an asm construct in C.
> I'm wondering how Emacs modes might have already tried to deal with this (if
> they have).
>
> What I'm thinking of is something like this: The major mode (e.g. SQL mode)
> recognizes the existence of an expression in the other language (e.g.
> XQuery), and somehow allows for use of a "regional" mode that acts on that
> (e.g. XQuery) expression. "Act on" could be anything - simple font-lock
> highlighting, indentation, syntax-checking, type-checking, or even
> evaluation.
>
> Anyone know of an attempt to deal with mixing two languages, perhaps by
> having a local (region) sub-mode?
>
>
>
--
Tim Johnson <tim@johnsons-web.com>
http://www.alaska-internet-solutions.com
next prev parent reply other threads:[~2005-11-27 22:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.16951.1133116592.20277.help-gnu-emacs@gnu.org>
2005-11-27 18:44 ` mode for a region? leon
2005-11-27 18:46 ` Ralf Angeli
2005-11-27 20:15 ` Drew Adams
2005-11-27 22:17 ` Tim Johnson [this message]
2005-11-27 18:36 Drew Adams
2005-11-27 18:51 ` Henrik Enberg
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=slrndok1jh.3hh.tim@linus.johnson.com \
--to=tim@johnsons-web.com \
/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.
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).