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

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

Re: mode for a region?


From: leon
Subject: Re: mode for a region?
Date: Sun, 27 Nov 2005 18:44:12 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Drew Adams" <drew.adams@oracle.com> writes:

 | 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?
That is multimode. Have a look at the following link

http://www.emacswiki.org/cgi-bin/wiki/MultipleModes

-- 
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
.     *                                       .
.    /.\  excuses are the easiest things      .
.   /..'\     to manufacture                  .
.   /'.'\   and the hardest things to sell    .
.  /.''.'\                                    .
.  /.'.'.\                                    .
. /'.''.'.\                                   .
. ^^^[_]^^^                                   .
.                                             .
.Leon                                         .
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.


reply via email to

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