From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Re: mode for a region? Date: Sun, 27 Nov 2005 22:17:24 -0000 Organization: Alaska Internet Solutions Message-ID: References: Reply-To: tim@johnsons-web.com NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1133130099 14345 80.91.229.2 (27 Nov 2005 22:21:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 27 Nov 2005 22:21:39 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 27 23:21:34 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EgUsq-0006YP-72 for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Nov 2005 23:20:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EgUsp-000691-3J for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Nov 2005 17:20:31 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!multikabel.net!feed20.multikabel.net!skynet.be!skynet.be!news.agarik.com!195.85.130.72.MISMATCH!feeder1.essentkabel.com!feeder1.essentkabel.com!81.171.88.15.MISMATCH!eweka!lightspeed.eweka.nl!138.199.65.86.MISMATCH!sn-ams!sn-ams-06!sn-ams-03!sn-ams-p01!sn-post-01!supernews.com!news.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: slrn/0.9.8.0 (Linux) Original-X-Complaints-To: abuse@supernews.com Original-Lines: 37 Original-Xref: shelby.stanford.edu gnu.emacs.help:135827 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:31430 Archived-At: On 2005-11-27, Drew Adams 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 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 http://www.alaska-internet-solutions.com