From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: mode for a region? Date: Sun, 27 Nov 2005 10:36:12 -0800 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1133116828 11094 80.91.229.2 (27 Nov 2005 18:40:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 27 Nov 2005 18:40:28 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 27 19:40:18 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EgRPu-0005un-Na for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Nov 2005 19:38:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EgRPu-0004Wb-2H for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Nov 2005 13:38:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EgRO1-0002tE-Ej for help-gnu-emacs@gnu.org; Sun, 27 Nov 2005 13:36:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EgRNy-0002oc-82 for help-gnu-emacs@gnu.org; Sun, 27 Nov 2005 13:36:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EgRNx-0002nr-PN for help-gnu-emacs@gnu.org; Sun, 27 Nov 2005 13:36:25 -0500 Original-Received: from [148.87.122.30] (helo=rgminet01.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EgRNx-0003XF-IQ for help-gnu-emacs@gnu.org; Sun, 27 Nov 2005 13:36:25 -0500 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.186.50]) by rgminet01.oracle.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id jARIaM34003870 for ; Sun, 27 Nov 2005 11:36:22 -0700 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id jARIaMQI012636 for ; Sun, 27 Nov 2005 11:36:22 -0700 Original-Received: from dradamslap (dhcp-amer-rmdc-csvpn-gw6-141-144-113-24.vpn.oracle.com [141.144.113.24]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id jARIaL7G012621 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Sun, 27 Nov 2005 11:36:21 -0700 Original-To: "Help-Gnu-Emacs" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) x-mimeole: Produced By Microsoft MimeOLE V6.00.2800.1506 Importance: Normal X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE 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:31417 Archived-At: 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?