From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: [MMM] Re: narrow-to-here-document Date: Tue, 08 Jul 2003 16:02:19 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20030620141028.GA1331@math.berkeley.edu> <20030621.012632.74543482.jet@gyve.org> <3EF73468.1030503@yahoo.com> <84r85cw0rk.fsf@lucy.is.informatik.uni-duisburg.de> <200307040032.h640WhKL015234@rum.cs.yale.edu> <20030707234541.GC11786@schilling.ugcs.caltech.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1057695154 19920 80.91.224.249 (8 Jul 2003 20:12:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 8 Jul 2003 20:12:34 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Jul 08 22:12:31 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19ZypD-0005Am-00 for ; Tue, 08 Jul 2003 22:12:31 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19Zyzi-00071K-00 for ; Tue, 08 Jul 2003 22:23:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19ZynK-0005JP-Rx for emacs-devel@quimby.gnus.org; Tue, 08 Jul 2003 16:10:34 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19Zyip-0003Vw-2v for emacs-devel@gnu.org; Tue, 08 Jul 2003 16:05:55 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19ZygF-0002Y7-W1 for emacs-devel@gnu.org; Tue, 08 Jul 2003 16:03:16 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19ZyfO-0001kv-PA for emacs-devel@gnu.org; Tue, 08 Jul 2003 16:02:22 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.20) id 19ZyfL-0006ZP-MC; Tue, 08 Jul 2003 16:02:19 -0400 Original-To: "Michael A. Shulman" In-reply-to: <20030707234541.GC11786@schilling.ugcs.caltech.edu> (shulman@ugcs.caltech.edu) Original-cc: monnier+gnu/emacs@cs.yale.edu Original-cc: mmm-mode-discuss@lists.sourceforge.net X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15496 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15496 Briefly, the way mmm-mode works is to parse the buffer for regions that it thinks (based on its configuration) ought to be edited using a different major mode, and create overlays to mark those positions. (It's not currently as good as we'd like at updating these overlays dynamically as text is edited, but I believe this is just because no one has sat down to write good code to do it.) Then it uses post-command-hook to check which region the point is in and make the buffer look (almost) like it's in the associated major mode. This fits in well with my idea for pseudo-indirect buffers. The overlays could have a special property that automatically directs the command loop to switch to a different pseudo-indirect buffer, which would bring the appropriate keymaps, syntax tables, etc. into force.