From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: /srv/bzr/emacs/trunk r101338: * lisp/emacs-lisp/syntax.el (syntax-ppss): More sanity check to catch Date: Sun, 16 Feb 2014 04:01:20 +0200 Message-ID: <53001BF0.20707@yandex.ru> References: <87r47bi1e5.fsf@yandex.ru> <52F96284.50507@yandex.ru> <52FAE12B.6060101@yandex.ru> <52FC3BEE.60604@yandex.ru> <52FCD2B4.5080006@yandex.ru> <52FD9F1D.50205@yandex.ru> <52FE315B.5010909@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1392516098 3422 80.91.229.3 (16 Feb 2014 02:01:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Feb 2014 02:01:38 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 16 03:01:45 2014 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 1WEr3A-00056a-PH for ged-emacs-devel@m.gmane.org; Sun, 16 Feb 2014 03:01:44 +0100 Original-Received: from localhost ([::1]:59258 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEr3A-0008RJ-Ag for ged-emacs-devel@m.gmane.org; Sat, 15 Feb 2014 21:01:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEr30-0008R9-DL for emacs-devel@gnu.org; Sat, 15 Feb 2014 21:01:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WEr2r-000076-RT for emacs-devel@gnu.org; Sat, 15 Feb 2014 21:01:34 -0500 Original-Received: from mail-ea0-x22a.google.com ([2a00:1450:4013:c01::22a]:59102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEr2r-000072-Kj for emacs-devel@gnu.org; Sat, 15 Feb 2014 21:01:25 -0500 Original-Received: by mail-ea0-f170.google.com with SMTP id g15so4734258eak.29 for ; Sat, 15 Feb 2014 18:01:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=96ilgLsHU0PdbsMFfrJLkYt4Gy/k3FKsXn6wVK3WG/0=; b=b292h0mzwIqqY61Gw+hAhyg9xTfGYdC71ETkIaCDXJMpNPDYfYNns6HvT/px6SEg8X T0Nr9LfjRUavnOHJQUiKqok9Qbr+hB1B+Jh81PfRm2so7lmbhV1fUAfkANLbCZ+uyrij VT5uooi6u38bs8xAxIE+lHy3HclMXuUy1nlWvrJ6Kx3B3rJPkXiP7KBXpFqRIJYI6ij6 tDbIVDNW3Z6Tf3RJ9oiMGpN9vy/4tI7AmyJ/dcq4yEAlTFgaynFPufo4xjUJpTTO+20J 6ooCNLHW8Qqwst5qgpFknF0KhBXIWqiF1orrW5a2VXx4rNTX/LK1c6ufbB095HtPq2ZH noXQ== X-Received: by 10.14.194.193 with SMTP id m41mr2335886een.76.1392516084692; Sat, 15 Feb 2014 18:01:24 -0800 (PST) Original-Received: from [192.168.10.2] ([93.109.195.252]) by mx.google.com with ESMTPSA id q44sm38903120eez.1.2014.02.15.18.01.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 15 Feb 2014 18:01:24 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::22a 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:169641 Archived-At: On 14.02.2014 19:08, Stefan Monnier wrote: >> Last time I checked, web-mode wasn't in this category: it's a major mode >> with explicit support for some templating languages. > > That's right, it doesn't try to handle major modes generically, but it > does have to solve similar problems, just with the benefit of being able > to custom-make its major modes. I'm not sure what you mean. web-mode has only one major mode, and its support of multiple template engines looks like this in the code: (defun web-mode-scan-blocks (reg-beg reg-end) ... (cond ((string= web-mode-engine "php") ... ((string= web-mode-engine "django") ... ((string= web-mode-engine "erb") ... and so on. >> mmm-mode would require a hunt for CA signatures, but it's not outside the >> realm of possibility. > > The way I see it rather is to start over from scratch, based on the > experience gained with mmm-mode, but with a different view: instead of > trying to make it work without changing existing modes, assume that > the major modes will be changed to fit the framework. > > The result should be much simpler/cleaner/shorter. The implementation of region classes definitions and parsing of the buffer could still be reused with this approach. Although, if the goal is to parse the buffer lazily, maybe adapting the relevant multi-mode code instead would be easier. > I tend to assume that mode switches shouldn't be that super frequent to > be a real performance problem, and that if they need to be sped up, > there are ways to do that, e.g. by providing a few "subr", so I'm not > too worried about it. Ok.