From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: web-mode.el Date: Tue, 19 Jun 2012 03:56:53 +0200 Message-ID: References: <4FD9F40C.90406@yandex.ru> <4FDAAADA.1030609@yandex.ru> <4FDC87D9.3080704@yandex.ru> <4FDFD35C.5070701@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1340071062 26297 80.91.229.3 (19 Jun 2012 01:57:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 19 Jun 2012 01:57:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 19 03:57:41 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 1SgnhI-0006qO-4r for ged-emacs-devel@m.gmane.org; Tue, 19 Jun 2012 03:57:36 +0200 Original-Received: from localhost ([::1]:60762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgnhI-0007O6-71 for ged-emacs-devel@m.gmane.org; Mon, 18 Jun 2012 21:57:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgnhE-0007Nd-0a for emacs-devel@gnu.org; Mon, 18 Jun 2012 21:57:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SgnhB-0001Ks-Kl for emacs-devel@gnu.org; Mon, 18 Jun 2012 21:57:31 -0400 Original-Received: from mail-lb0-f169.google.com ([209.85.217.169]:44700) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgnhB-0001KH-BR for emacs-devel@gnu.org; Mon, 18 Jun 2012 21:57:29 -0400 Original-Received: by lbjn8 with SMTP id n8so6114335lbj.0 for ; Mon, 18 Jun 2012 18:57:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=eg6CqAIdu2EoqPP6YQn0cpYl2uqO8JWblcAerc6ADDE=; b=fDguNKIRE5wmLUIXcI0Y4hZSjdfREnGMBojjHRPt5A+MRx+vx8TQjobyw/r+58exFi 3HfnYZuEffyI3ztQgPYxBiQw6ykM8yeGytemWdBnYGwBmJvNlYN6jbhc8t8DVWKaovMb 181MFYGIxcVDKH9+QUaP4x0WVA6tV/DnKZbLrB6aAhFWGfXtmXSR1EerY5UrWCa5NW0p etHhq6nAUXh9RDH+Zg6cqncY5/vPeP2C+cRpgQ7gf//S/TtPQkqWIlWTIqpLxz/MRtI8 V8Cvllcw8JW6oQFjp+6djea+LMjWGTEjoxe5L/Ix1TQU4nMqMkMG4cpJol7gPUtOJMMO dhjA== Original-Received: by 10.112.45.168 with SMTP id o8mr7253003lbm.88.1340071046301; Mon, 18 Jun 2012 18:57:26 -0700 (PDT) Original-Received: by 10.112.41.99 with HTTP; Mon, 18 Jun 2012 18:56:53 -0700 (PDT) In-Reply-To: <4FDFD35C.5070701@yandex.ru> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.217.169 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:151008 Archived-At: On Tue, Jun 19, 2012 at 3:18 AM, Dmitry Gutov wrote: > > What if the difference between mumamo-depth of pre-pre chunk and this one= is > 1 or -1, can you indent correctly in this case? If so, why the difference= of > 0 is a special case? Is this just a speed optimization? Yes, 0 is a special case. All chunks that "belongs to" the main major mode (this could be for example html-mode) in the file has mumamo-depth 0. Sub-chunks (for example a js or css chunk) has mumamo-depth 1, i.e. 0+1. The sub-chunks could themselves have sub-chunks which then have a +1 greater mumamo-depth. If a pre-pre chunk has the same depth as this one then the code in this one could be a continuation of the code in the pre-pre chunk. (This could be the case in for example a file which html+php code.) So the user probably expects those chunks to be indented together. >> That is because it is a full parser. I think we will see more such >> examples now that CEDET is finally inside Emacs. > > > As long as we don't try to use js2-mode as primary mode, the "full parser= " > thing won't be a problem, since it respects narrowing. That is nice, but we can't always expect it to work that way. At least not = yet. >> Yes, I was trying to answer that. The reason it fails is because >> nxml-mode (like js2-mode) contains a full parser. I have been thinking >> that rewriting it is very difficult, but maybe Stefan's proposal (the >> change to "syntax-ppss") is a =C2=A0rather easy road. > > > I don't think this changes much for nxml-mode: it uses the parser from > xmltok.el, which doesn't employ any of the -sexp commands. I thought that parser perhaps could use the -sexp commands for testing.