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: multi-character syntactic entities in syntax tables Date: Sat, 27 Apr 2013 00:57:04 +0400 Message-ID: <517AEA20.9070707@yandex.ru> References: <87sj2d86o9.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1367009836 16644 80.91.229.3 (26 Apr 2013 20:57:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Apr 2013 20:57:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: Erik Charlebois Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 26 22:57:20 2013 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 1UVphn-0006Ro-LG for ged-emacs-devel@m.gmane.org; Fri, 26 Apr 2013 22:57:19 +0200 Original-Received: from localhost ([::1]:59365 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVphn-0003lq-CK for ged-emacs-devel@m.gmane.org; Fri, 26 Apr 2013 16:57:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVphg-0003l0-In for emacs-devel@gnu.org; Fri, 26 Apr 2013 16:57:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVpha-0005XJ-Sj for emacs-devel@gnu.org; Fri, 26 Apr 2013 16:57:12 -0400 Original-Received: from mail-lb0-f178.google.com ([209.85.217.178]:64505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVpha-0005XD-Kd for emacs-devel@gnu.org; Fri, 26 Apr 2013 16:57:06 -0400 Original-Received: by mail-lb0-f178.google.com with SMTP id w10so4147285lbi.37 for ; Fri, 26 Apr 2013 13:57:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding:x-antivirus:x-antivirus-status; bh=kmmBK7sZJf9b2B4fEgjwfdDB8/RUH1tmv0iDtwcecN8=; b=u2cOkf7UcEo/r4XI9fiP+CG8ICMsyUs4URI/7ra9jOswSsggy+qvd5utDKmzOTHje9 sMZHCJ2nYQzhlwK50/NVPMSsoj9AqB8SWGOoHiK2/cdhrt+7/U+JavGslAPsx7jStW6G Koo3zvy0/nJx19hEqv3xN0G1AbKDmIq1l9Lc67zKT5IvzuywPb2gTh9MfLUMCvLUMRQF sM4VeVmhdfuF+Swmmotr/tUI7L/UxOJuyxXREZYl1Wmsks66M2LgF1GOgr7MZq7GBpHL x/Y6WOXkK+8YgX+DonNPfsPCLCNX5Wv0y7aQDvJE7LZ70lZTV/4R16EfQhUG/4ADqbSr Eqjw== X-Received: by 10.112.142.234 with SMTP id rz10mr21037570lbb.5.1367009825594; Fri, 26 Apr 2013 13:57:05 -0700 (PDT) Original-Received: from [127.0.0.1] ([178.252.98.87]) by mx.google.com with ESMTPSA id sh6sm2216707lbb.2.2013.04.26.13.57.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Apr 2013 13:57:04 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 In-Reply-To: X-Antivirus: avast! (VPS 130426-0, 26.04.2013), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.217.178 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:159173 Archived-At: On 26.04.2013 23:22, Erik Charlebois wrote: > Off the top of my head, point motion (e.g. forward-word should skip the > entire word, not stop where the syntax class changes from "(" to "w") > and font locking (show-paren-mode should highlight the entire matching > words). But `forward-word' will jump to the end of the next word then, since "begin" as a whole would have non-word syntax. > Since the matching keyword lengths can be different (begin vs end), my > understanding is I can't just turn them into ((((( and ))) because it > doesn't balance. Yes, that's not what my suggestion was. > Currently I have some hacks for Ruby mode that makes the first > characters of the block keywords have "(" or ")" syntax class. It works > fine, aside from point motion and font locking. I would've put ")" at the end of "end", but otherwise, that is it. I didn't expect it to work with current open/close parens syntax classes, though: "string quotes", in similar circumstances, doesn't. The problem with font-lock is important. Maybe we need a syntax class that would mark text as symbol (or word) constituent (or delegate to the buffer syntax table), and at the same time mark them as parenthesising construct.