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: multi-mode editing, including literate Haskell and noweb Date: Wed, 19 Jan 2005 21:14:18 -0500 Message-ID: References: <87llasfetn.fsf@robotron.ath.cx> <87is5u62jj.fsf@robotron.ath.cx> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1106187748 25067 80.91.229.6 (20 Jan 2005 02:22:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Jan 2005 02:22:28 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 20 03:22:23 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CrRxn-00066m-00 for ; Thu, 20 Jan 2005 03:22:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CrS3u-0008RK-3s for ged-emacs-devel@m.gmane.org; Wed, 19 Jan 2005 21:28:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CrS3U-0008LE-Rl for emacs-devel@gnu.org; Wed, 19 Jan 2005 21:28:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CrS3H-0008Cv-TA for emacs-devel@gnu.org; Wed, 19 Jan 2005 21:28:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CrS3H-0008Ck-Pi for emacs-devel@gnu.org; Wed, 19 Jan 2005 21:28:03 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CrRrG-0001U2-AI for emacs-devel@gnu.org; Wed, 19 Jan 2005 21:15:38 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1CrRpy-0007rM-CG; Wed, 19 Jan 2005 21:14:19 -0500 Original-To: David Hansen In-reply-to: <87is5u62jj.fsf@robotron.ath.cx> (message from David Hansen on Tue, 18 Jan 2005 19:00:00 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32405 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32405 I don't think there is an easy solution to handle such cases. How far the major mode has to look back heavily depends on the syntactic state of your code at point (and of course how the major mode deals with it). That is sometimes true. It means those indentation functions that are used in multi-mode context would need to be modified to cope with the presence of interpolated text of other kinds. They could use the multi-mode mechanism to find the previous block of text that is of the same kind, and continue the scan there. Worst case may be that all chunks from the beginning of the buffer up to point are needed. Sometimes that will happen. This is kind of inconsistent with the `narrow-to-region' approach. That's just an approach, not an absolute rule of using multi-mode. So I think this is a real issue, but not a fatal problem.