From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: Multiple major modes Date: Tue, 12 Jun 2007 23:04:50 +0200 Message-ID: <466F0A72.8090208@gmail.com> References: <466E7A93.3050705@gmail.com> <466E81AA.3030202@gnu.org> <466E9822.2050508@gmail.com> <466EAB9D.9020408@gnu.org> <466EEA71.2070700@gmail.com> <200706122014.l5CKEKV1021902@projectile.siege-engine.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1181683164 14095 80.91.229.12 (12 Jun 2007 21:19:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Jun 2007 21:19:24 +0000 (UTC) Cc: sdl.web@gmail.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca, jasonr@gnu.org To: "Eric M. Ludlam" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 12 23:19:22 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from mail-forward.uio.no ([129.240.10.42]) by lo.gmane.org with esmtp (Exim 4.50) id 1HyDli-0007aT-5G for ged-emacs-devel@m.gmane.org; Tue, 12 Jun 2007 23:19:14 +0200 Original-Received: from mail-mx9.uio.no ([129.240.10.39]) by pat.uio.no with esmtp (Exim 4.66) (envelope-from ) id 1HyDZm-0002mv-70 for ged-emacs-devel@m.gmane.org; Tue, 12 Jun 2007 23:06:54 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by mail-mx9.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.66) (envelope-from ) id 1HyDZY-0001El-GH for ged-emacs-devel@m.gmane.org; Tue, 12 Jun 2007 23:06:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HyDYd-0002dl-Qu for ged-emacs-devel@m.gmane.org; Tue, 12 Jun 2007 17:05:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HyDYZ-0002af-Rb for emacs-devel@gnu.org; Tue, 12 Jun 2007 17:05:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HyDYY-0002YP-Dn for emacs-devel@gnu.org; Tue, 12 Jun 2007 17:05:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HyDYY-0002YI-5i for emacs-devel@gnu.org; Tue, 12 Jun 2007 17:05:38 -0400 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HyDYW-0008HZ-Mx; Tue, 12 Jun 2007 17:05:37 -0400 Original-Received: from c83-254-133-189.bredband.comhem.se ([83.254.133.189]:64417 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.66) (envelope-from ) id 1HyDYE-0004zk-44; Tue, 12 Jun 2007 23:05:18 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666 In-Reply-To: <200706122014.l5CKEKV1021902@projectile.siege-engine.com> X-Antivirus: avast! (VPS 000748-4, 2007-06-12), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.133.189 X-Scan-Result: No virus found in message 1HyDYE-0004zk-44. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1HyDYE-0004zk-44 7b849c8f99f92407b167277eb2353240 X-detected-kernel: Linux 2.6? (barebone, rare!) 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 X-UiO-SPF-Received: Received-SPF: pass (mail-mx9.uio.no: domain of gnu.org designates 199.232.76.165 as permitted sender) client-ip=199.232.76.165; envelope-from=emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org; helo=lists.gnu.org; X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=12.0, autolearn=disabled, AWL=0.009,UNPARSEABLE_RELAY=0.001) X-UiO-Scanned: 18D04DD3F30AF54C5BFA074C98AD7293D27C07F4 X-UiO-SPAM-Test: remote_host: 199.232.76.165 spam_score: 0 maxlevel 200 minaction 2 bait 0 mail/h: 2 total 9388 max/h 41 blacklist 0 greylist 0 ratelimit 0 Xref: news.gmane.org gmane.emacs.devel:72714 Archived-At: Eric M. Ludlam wrote: > [ ... ] >>>> "Lennart Borgman (gmail)" seems to think that: >> Stefan Monnier wrote: >>>> and something that should be addressed without imposing restrictions on >>>> specialized major modes. >>> Actually, I think that in order to address it well, we will need to impose >>> restrictions on major modes (though only on the ones involved in >>> multiple-major-mode buffers) and maybe also on minor modes. > > My parsing tool (semantic, referenced earlier) solved some problems w/ > lots of mode-specific configurations via 'mode-local' variables and > methods. David Ponce wrote this, and suggested it here once before. > I don't recall what the end resolution was on it. > > A multi-mode style thing would likely be simplified if key behaviors > were all defined via mode-local configurations, as that would allow > the multi-mode manager to get a complete query list of all > configuration differences without running the major-mode function. > > http://cedet.cvs.sourceforge.net/cedet/cedet/common/mode-local.el?view=log Would it be possible to catch all local bindings by setting the major mode in a temporary buffer and then save them for later use? This would avoid having to change major modes, perhaps. > This tools has a spiff macro `with-mode-local', which lets you run a > bunch of code as if some other mode were active. This is used in our > grammar file so we can operate on grammar syntax w/ lisp syntax mixed > in. We can also operate on tags from other buffers by momentarily > using features of the originating major-mode. > > Enjoy > Eric