help-gnu-emacs
[Top][All Lists]
Advanced

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

mode for a region?


From: Drew Adams
Subject: mode for a region?
Date: Sun, 27 Nov 2005 10:36:12 -0800

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?





reply via email to

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