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: Mon, 8 Jul 2013 12:37:35 +0300 Message-ID: References: <2A6700DEDCA640EF92B326002717596D@gmail.com> <87txkrm46t.fsf@yandex.ru> <6EF2AEF8D67840A2AF1C908AA3D0725F@gmail.com> <51C5A67A.2020002@yandex.ru> <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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b6da6166034bd04e0fccb47 X-Trace: ger.gmane.org 1373276269 26520 80.91.229.3 (8 Jul 2013 09:37:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Jul 2013 09:37:49 +0000 (UTC) Cc: emacs-devel , Dmitry Gutov To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 08 11:37:51 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 1Uw7tG-0008Sa-Nd for ged-emacs-devel@m.gmane.org; Mon, 08 Jul 2013 11:37:50 +0200 Original-Received: from localhost ([::1]:58260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uw7tG-0007fO-BE for ged-emacs-devel@m.gmane.org; Mon, 08 Jul 2013 05:37:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uw7t7-0007Yh-M1 for emacs-devel@gnu.org; Mon, 08 Jul 2013 05:37:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uw7t1-0006Ll-RW for emacs-devel@gnu.org; Mon, 08 Jul 2013 05:37:41 -0400 Original-Received: from mail-qe0-x22e.google.com ([2607:f8b0:400d:c02::22e]:43447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uw7t1-0006Lc-MN for emacs-devel@gnu.org; Mon, 08 Jul 2013 05:37:35 -0400 Original-Received: by mail-qe0-f46.google.com with SMTP id nd7so2173576qeb.33 for ; Mon, 08 Jul 2013 02:37:35 -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=CU/VdpKZyPqYkRfmCm4hEPR1EaINUE1MHlYEAvculu8=; b=VkTPJmalVB7g9jsc6rwhskfvnlAsUh2jOpr3/L6T3IuYe7/zQZRz5vDUDDn/ZfBiBV LEZMPXMj2V4YOxIARLa7Wgfl2buP566Dl3utfLCjN0u1BgcaJWruXcqI84dlF7t2xmmA 09igwRE9YHxuO7xermEgqDa0520994tFx+SoS3TYT5z8osn7dmBGIK5T6KhApjXqO5p+ ADJUej9rgu3DLp2+R38tgBt00Lsngd9sfO0ZxgIKHBL8zgS6CnyrwRDRGkPTYQorAgFV DP4DtwPoh0GnHeUgseNvENZoe1IQqHvw2LePBJO2g9yLY5687GRZrQIuyXDN2wH4uqvf Dc0A== X-Received: by 10.49.95.97 with SMTP id dj1mr15108695qeb.46.1373276255300; Mon, 08 Jul 2013 02:37:35 -0700 (PDT) Original-Received: by 10.49.59.13 with HTTP; Mon, 8 Jul 2013 02:37:35 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: P86Mfj67LhXXyH8hBhUj_nJ9ppg X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c02::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:161722 Archived-At: --047d7b6da6166034bd04e0fccb47 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I noticed a couple of more font locking problems that we might want to address. They are related to method names. Consider this code def self.some_name .... def SomeClass.some_name ... self and SomeClass are currently highlighted with the same face as the method name, although they are not actually part of the method name. self should be highlighted with the variable face and class/modules with the type face. On 8 July 2013 12:33, Bozhidar Batsov wrote: > On 8 July 2013 00:56, Stefan Monnier wrote: > >> >> SMIE comes with Emacs since 23.4 and ruby-mode doesn't use SMIE: >> > I'm interested in working on this, but I'm not sure how soon I'll be >> able >> > to fit it in my schedule. >> >> Please do send along any question you might have about SMIE. >> >> >> >> * make use of `font-lock-negation-char-face` for ! >> >> Why have a special face for the negation char? What's so special abo= ut >> >> this char? >> > As the face description says it's pretty easy to overlook an ! attache= d >> to >> > some identifier(like !ol - you can mistake the this for lol). >> >> Hmm... never thought of it as a problem. So presumably this face >> wouldn't be used for variants like "=C2=AC" or "not", right? >> > > Yep, I'm pretty sure the idea is to use it just for !. > >> >> >> ruby-mode doesn't run on older Emacsen, but it's not hard to fix. >> Since >> >> earlier versions distributed via Marmalade and Tromey's archive seem = to >> >> cause problems, perhaps we should make an effort and upload the curre= nt >> >> version to Marmalade, at least once. It stable enough, I think. >> >> More generally, we could sync up the Emacs trunk code with the >> ruby-mode in http://svn.ruby-lang.org/repos/ruby/trunk/misc. >> >> > I guess this makes sense. I've often seen complaints about the >> ruby-mode in >> > Marmalade being older than the one currently bundled in Emacs. >> >> As long as it doesn't cause people to fork (i.e. start contributing new >> features to some older version of ruby-mode such as the one in >> svn.ruby-lang.org, it's not really a problem. >> >> >> We should contact Kyle, then, for the copyright assignment. Or, again= , >> >> patches welcome. :) >> > I guess it'd be best of Stefan approached him? >> >> I can't see any email address. Could you ask him to get in touch with m= e? >> > > I saw this email on his GitHub profile pd@krh.me > >> >> >> Stefan >> > > --047d7b6da6166034bd04e0fccb47 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I noticed a couple of more font locking problems that we m= ight want to address. They are related to method names. Consider this code<= div>

def self.some_name ....

def SomeClass.some_name ...

=
self and SomeClass are currently highlighted with the same face = as the method name, although they are not actually part of the method name.= self should be highlighted with the variable face and class/modules with t= he type face.=C2=A0



On 8 July 2013 12:33, Bozhidar Batsov <<= a href=3D"mailto:bozhidar@batsov.com" target=3D"_blank">bozhidar@batsov.com= > wrote:
On 8 July= 2013 00:56, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> SMIE comes with Emacs since 23.4 and ruby-mo= de doesn't use SMIE:
> I'm interested in working on this, but I'm not sure= how soon I'll be able
> to fit it in my schedule.

Please do send along any question you might have about SMIE.

>> >> * make use of `font-lock-negation-char-face` for !
>> Why have a special face for the negation char? =C2=A0Wh= at's so special about
>> this char?
> As the face description says it's pretty easy to overlook an ! att= ached to
> some identifier(like !ol - you can mistake the this for lol).

Hmm... never thought of it as a problem. =C2=A0So presumably this fac= e
wouldn't be used for variants like "=C2=AC" or "not"= ;, right?

Yep, I'm pretty sur= e the idea is to use it just for !.=C2=A0

>> ruby-mode doesn't run on older Emacsen, but it's not hard = to fix. =C2=A0Since
>> earlier versions distributed via Marmalade and Tromey's archiv= e seem to
>> cause problems, perhaps we should make an effort and upload the cu= rrent
>> version to Marmalade, at least once. It stable enough, I think.
More generally, we could sync up the Emacs trunk code with the
ruby-mode in http://svn.ruby-lang.org/repos/ruby/trunk/misc.

> I guess this makes sense. I've often seen complaints about the rub= y-mode in
> Marmalade being older than the one currently bundled in Emacs.

As long as it doesn't cause people to fork (i.e. start contributi= ng new
features to some older version of ruby-mode such as the one in
svn.ruby-lang.org, it's not really a problem.

>> We should contact Kyle, then, for the copyright assignment. Or, ag= ain,
>> patches welcome. :)
> I guess it'd be best of Stefan approached him?

I can't see any email address. =C2=A0Could you ask him to get in = touch with me?

I saw this email o= n his GitHub profile=C2=A0pd@krh.me=C2=A0


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan


--047d7b6da6166034bd04e0fccb47--