unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: mode for a region?
Date: Sun, 27 Nov 2005 10:36:12 -0800	[thread overview]
Message-ID: <MEEKKIABFKKDFJMPIOEBOEKLCNAA.drew.adams@oracle.com> (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?

             reply	other threads:[~2005-11-27 18:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-27 18:36 Drew Adams [this message]
2005-11-27 18:51 ` mode for a region? Henrik Enberg
     [not found] <mailman.16951.1133116592.20277.help-gnu-emacs@gnu.org>
2005-11-27 18:44 ` leon
2005-11-27 18:46 ` Ralf Angeli
2005-11-27 20:15   ` Drew Adams
2005-11-27 22:17 ` Tim Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MEEKKIABFKKDFJMPIOEBOEKLCNAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).