unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* mode for a region?
@ 2005-11-27 18:36 Drew Adams
  2005-11-27 18:51 ` Henrik Enberg
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2005-11-27 18:36 UTC (permalink / raw)


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.

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?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-11-27 22:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
2005-11-27 18:36 Drew Adams
2005-11-27 18:51 ` Henrik Enberg

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).