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: Tue, 16 Jul 2013 16:18:35 +0300 Message-ID: References: <2A6700DEDCA640EF92B326002717596D@gmail.com> <51D4476A.40107@yandex.ru> <51D6A02C.2020207@yandex.ru> <51D6D500.7080306@yandex.ru> <51DB6516.1090708@yandex.ru> <51DC43CE.3090206@yandex.ru> <51DDA366.9020700@yandex.ru> <51E06787.8020401@yandex.ru> <51E1A62A.1030204@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b6da73e81baad04e1a0d09b X-Trace: ger.gmane.org 1373980737 2952 80.91.229.3 (16 Jul 2013 13:18:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Jul 2013 13:18:57 +0000 (UTC) Cc: emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 16 15:18:59 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 1Uz59e-0005tT-20 for ged-emacs-devel@m.gmane.org; Tue, 16 Jul 2013 15:18:58 +0200 Original-Received: from localhost ([::1]:51364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz59d-00015P-Kf for ged-emacs-devel@m.gmane.org; Tue, 16 Jul 2013 09:18:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz59T-00015B-Ar for emacs-devel@gnu.org; Tue, 16 Jul 2013 09:18:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uz59I-0005qK-Gi for emacs-devel@gnu.org; Tue, 16 Jul 2013 09:18:47 -0400 Original-Received: from mail-qc0-x22e.google.com ([2607:f8b0:400d:c01::22e]:59339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz59I-0005qB-BG for emacs-devel@gnu.org; Tue, 16 Jul 2013 09:18:36 -0400 Original-Received: by mail-qc0-f174.google.com with SMTP id m15so349600qcq.33 for ; Tue, 16 Jul 2013 06:18:36 -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=LsYyCkDcmNWVuGn22WyRwNDMXoT7pCQB95Cb4+bLMCw=; b=W/46i6fTEmlmyJFywusfmVXzmdXNns5KZOQTp6TfvjtzTDpP0hSvRea0fDLdxxic4/ +w+Yw2uCB7ZpRvcpnNLsHy/Wh/yRgkBztCPkyqMXYbTNwB8TaGOT5K0lWClip05zohcb gUn1xGXqdjkUkglRDkitzpHLQsTvQAHP26KRBs5081icgNkvpDYQPa2Jiv7TKe+Wj7op IrlYbZXbS/n1FX9+Su969LIKrEHghKTkjVHriC0kB2onTKdxtQxOKLTDFR+E+yz/nTdY B7P1QUsnaqbmxg+sNybpGb2OsHQQ67lr0uZIhyTJ5MqkMJcuzvnLT6ugePRhFklGrOQH Sy7w== X-Received: by 10.49.13.229 with SMTP id k5mr1801385qec.64.1373980716020; Tue, 16 Jul 2013 06:18:36 -0700 (PDT) Original-Received: by 10.49.59.13 with HTTP; Tue, 16 Jul 2013 06:18:35 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: y9bhjvzS5i8BL5g0_AHE5pFEOBg X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c01::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:161927 Archived-At: --047d7b6da73e81baad04e1a0d09b Content-Type: text/plain; charset=UTF-8 Btw, I think you've introduced a bug with one of your changes. Paste this into Emacs: return if safe_assignment?(cond) && safe_assignment_allowed? "?(" and the last "?" are highlighted with the font-lock-string face. On 15 July 2013 16:53, Bozhidar Batsov wrote: > > > > On 13 July 2013 22:10, Dmitry Gutov wrote: > >> On 13.07.2013 14:23, Bozhidar Batsov wrote: >> >>> Great! Btw, shouldn't we highlight the conversion methods from Kernel >>> (Float, Integer, etc) as built-ins? >>> >> >> Sure, it's now easier to do correctly. Done. :) > > > Thanks! > > >> >> >> But there's really nothing that would distinguish a Math::E >>> reference from Foo::C. Or from GC, IO, DL, IRB, URI, XML, HTML, etc. >>> >>> >>> Yep, I'm aware we can't distinguish all cases without the use of a >>> proper parser, but I guess we should handle accordingly at least the >>> scenarios which are deterministic. >>> >> >> But we have to highlight these abbreviation-named modules *somehow*. And >> we're bound to be wrong in 50% of these cases. That's why I don't think >> it's a good idea. >> >> That difference in highlighting wouldn't convey much information anyway: >> uppercase text with underscores is easy to notice as it is. >> > > Fair enough :-) > > --047d7b6da73e81baad04e1a0d09b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Btw, I think you've introduced a bug with one of your = changes. Paste this into Emacs:

return if safe_assignmen= t?(cond) && safe_assignment_allowed?

"?(" and the last "?" are highlighted with the font-loc= k-string face.


On 15 July 2013 16:53, Bozhidar Batsov <<= a href=3D"mailto:bozhidar@batsov.com" target=3D"_blank">bozhidar@batsov.com= > wrote:



On 13 July 2013 22= :10, Dmitry Gutov <dgutov@yandex.ru> wrote:
On 13.07.2013 14:23, Bozhidar Batsov wr= ote:
Great! Btw, shouldn't we highlight the conversion methods from Kernel (Float, Integer, etc) as built-ins?

Sure, it's now easier to do correctly. Done. :)

Thanks!
=C2=A0


=C2=A0 =C2=A0 But there's really nothing that would distinguish a Math:= :E
=C2=A0 =C2=A0 reference from Foo::C. Or from GC, IO, DL, IRB, URI, XML, HTM= L, etc.


Yep, I'm aware we can't distinguish all cases without the use of a<= br> proper parser, but I guess we should handle accordingly at least the
scenarios which are deterministic.

But we have to highlight these abbreviation-named modules *somehow*. And we= 're bound to be wrong in 50% of these cases. That's why I don't= think it's a good idea.

That difference in highlighting wouldn't convey much information anyway= : uppercase text with underscores is easy to notice as it is.

Fair enough :-)=C2=A0


--047d7b6da73e81baad04e1a0d09b--