From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bozhidar Batsov Newsgroups: gmane.emacs.devel Subject: Re: Small improvements to ruby-mode Date: Wed, 10 Jul 2013 09:09:08 +0300 Message-ID: References: <2A6700DEDCA640EF92B326002717596D@gmail.com> <51C6EA5F.2040408@yandex.ru> <51D1CB5A.2060900@yandex.ru> <51D1F98D.3060900@yandex.ru> <51D31E12.7060002@yandex.ru> <51D4476A.40107@yandex.ru> <51D6A02C.2020207@yandex.ru> <51D6D500.7080306@yandex.ru> <51DB6516.1090708@yandex.ru> <51DC43CE.3090206@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1132e00a9b0bb604e1221d04 X-Trace: ger.gmane.org 1373436561 17816 80.91.229.3 (10 Jul 2013 06:09:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Jul 2013 06:09:21 +0000 (UTC) Cc: Stefan Monnier , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 10 08:09:22 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 1Uwnab-0007Un-SH for ged-emacs-devel@m.gmane.org; Wed, 10 Jul 2013 08:09:22 +0200 Original-Received: from localhost ([::1]:33988 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uwnab-0005bw-Bc for ged-emacs-devel@m.gmane.org; Wed, 10 Jul 2013 02:09:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwnaT-0005bq-Er for emacs-devel@gnu.org; Wed, 10 Jul 2013 02:09:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UwnaP-0001Cz-H0 for emacs-devel@gnu.org; Wed, 10 Jul 2013 02:09:13 -0400 Original-Received: from mail-qa0-x22e.google.com ([2607:f8b0:400d:c00::22e]:41296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwnaP-0001Cu-C4 for emacs-devel@gnu.org; Wed, 10 Jul 2013 02:09:09 -0400 Original-Received: by mail-qa0-f46.google.com with SMTP id bn16so1830908qab.12 for ; Tue, 09 Jul 2013 23:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=1eQ6FPGikbiSrtDgle/hmeFAvXqHhVZEFDHqus55XAQ=; b=H6LjF3ZUzcqy2SRlyn1SZE8X/hloxpBpW/HNQTYXrfkzJodpBo63TDAqFAm9U3V6uJ c5vXcnpUvkOQqf0HVHZtYB9PKY0rHnzG8Fa3Q065d0a6Aku1u8Ifd7cvL07QChZjRMg4 cQyoKFw377DJF2hx9GboKEg+2NPqhkQKfSRO/sE+Ac7r3zdhVHHiYXuXcdIhY2veBfJ8 ggIdZHC26fO+peA+QB4e9NlrUOJUkc+S6HfDgAJvvKCflHNF3OXBPJ9tQRx2SEjCcSCX odFYpDTO+uDNSSuzMj5PYN6LpmsbgsRwj9Vy8yIKCFSdsb5kRp8jGZ+i4rZfQEmOCAch VB3A== X-Received: by 10.224.88.74 with SMTP id z10mr26656637qal.26.1373436548679; Tue, 09 Jul 2013 23:09:08 -0700 (PDT) Original-Received: by 10.49.59.13 with HTTP; Tue, 9 Jul 2013 23:09:08 -0700 (PDT) In-Reply-To: <51DC43CE.3090206@yandex.ru> X-Google-Sender-Auth: Hhl9DEftasyzrbbpwkQL0LZVbw8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c00::22e 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:161793 Archived-At: --001a1132e00a9b0bb604e1221d04 Content-Type: text/plain; charset=UTF-8 On 9 July 2013 20:09, Dmitry Gutov wrote: > On 09.07.2013 18:36, Bozhidar Batsov wrote: > >> I've noticed two more font look issues (I guess I'm becoming annoying :-) >> ): >> > > Not really. The novelty of seeing a Ruby user in emacs-devel still hasn't > worn off. :) > > You might want to start filing new reports as bugs, though. Normally I'd have been doing that from the start, but I'm not extremely fond of Emacs's "issue tracker". Despite my feelings for it I will start using it, though. > > > - ?c, ?x, ?\n, ?\C-\M-d, etc should be font-locked as strings I guess, >> since from Ruby 1.9 the character literal syntax actually yields strings. >> > > It will be the right thing to do, but handling the backslashes and key > chords looks kind of complicated. Yep, the highlighting regexp won't be exactly pretty :-) > > > - there should be support for the new %I/%i literals from Ruby 2.0 - I >> guess we should font-lock them as symbols >> > > I guess we should, but it's kind of complicated. The point of using > percent literals is that you can put any stuff, at all, inside, and the > only suitable Emacs syntax classes for that are strings and comments. > > We should be able to overwrite that highlighting in > ruby-font-lock-keywords, but I don't see a good way to do that, yet. This > facility works with regexp-based search, and we need to effectively say > "highlight from here and till the end of the string literal". --001a1132e00a9b0bb604e1221d04 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On 9 July 2013 20:09, Dmitry Gutov <<= a href=3D"mailto:dgutov@yandex.ru" target=3D"_blank">dgutov@yandex.ru&g= t; wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
On 09.07.2013 18:36, Bozhidar Batsov wrote:
I've noticed two more font look issues (I guess I'm becoming annoyi= ng :-) ):

Not really. The novelty of seeing a Ruby user in emacs-devel still hasn'= ;t worn off. :)

You might want to start filing new reports as bugs, though.
Normally I'd have been doing that from the start= , but I'm not extremely fond of Emacs's "issue tracker". = Despite my feelings for it I will start using it, though.
=C2=A0

- ?c, ?x, ?\n, ?\C-\M-d, etc should be font-locked as strings I guess,
since from Ruby 1.9 the character literal syntax actually yields strings.

It will be the right thing to do, but handling the backslashes and key chor= ds looks kind of complicated.

Y= ep, the highlighting regexp won't be exactly pretty :-)=C2=A0


- there should be support for the new %I/%i literals from Ruby 2.0 - I
guess we should font-lock them as symbols

I guess we should, but it's kind of complicated. The point of using per= cent literals is that you can put any stuff, at all, inside, and the only s= uitable Emacs syntax classes for that are strings and comments.

We should be able to overwrite that highlighting in ruby-font-lock-keywords= , but I don't see a good way to do that, yet. This facility works with = regexp-based search, and we need to effectively say "highlight from he= re and till the end of the string literal".=C2=A0

--001a1132e00a9b0bb604e1221d04--