From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: web-mode.el Date: Wed, 13 Jun 2012 23:23:54 -0400 Message-ID: References: <4FD9313D.70303@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1339644252 9504 80.91.229.3 (14 Jun 2012 03:24:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 14 Jun 2012 03:24:12 +0000 (UTC) Cc: cyd@gnu.org, lennart.borgman@gmail.com, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 14 05:24:09 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sf0fE-0000Xl-Rf for ged-emacs-devel@m.gmane.org; Thu, 14 Jun 2012 05:24:04 +0200 Original-Received: from localhost ([::1]:56089 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sf0fE-0002bh-HU for ged-emacs-devel@m.gmane.org; Wed, 13 Jun 2012 23:24:04 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sf0fB-0002bc-Jv for emacs-devel@gnu.org; Wed, 13 Jun 2012 23:24:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sf0f9-0007Xz-Vw for emacs-devel@gnu.org; Wed, 13 Jun 2012 23:24:01 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:52206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sf0f7-0007XD-IU; Wed, 13 Jun 2012 23:23:57 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09MCqwm/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLDiYSFBgNJIgcBboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="191359696" Original-Received: from 76-10-172-38.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([76.10.172.38]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 13 Jun 2012 23:23:55 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id AF719AE105; Wed, 13 Jun 2012 23:23:54 -0400 (EDT) In-Reply-To: <4FD9313D.70303@yandex.ru> (Dmitry Gutov's message of "Thu, 14 Jun 2012 04:33:01 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150941 Archived-At: > I'm also using narrowing during indentation, but some modes (like js) > use (widen) in indent-line-function. It should be somewhat fixable by I don't think it's worthwhile trying to make a "multi-major-mode" that works with any major mode, no matter what wicked thing it does. So it's OK to impose a few conventions that the major mode needs to obey. The important and difficult part is to figure what those conventions need to be. Of course, tweaking some parts of the C mode might help. E.g. we could maybe extend syntax-tables slightly so that chunk boundaries are marked with a special syntax-table value which then makes forward-comment skip over "other language" chunks, so that any indentation code which consistently ignores comments would then work in multi-major-mode. Stefan