emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#10786: closed (24.0.93; ruby-mode improperly handl


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#10786: closed (24.0.93; ruby-mode improperly handles symbols with keyword names in JS-style hashes)
Date: Wed, 21 Mar 2012 19:05:02 +0000

Your message dated Wed, 21 Mar 2012 14:33:28 -0400
with message-id <address@hidden>
and subject line Re: bug#10786: 24.0.93; ruby-mode improperly handles symbols 
with keyword names in JS-style hashes
has caused the debbugs.gnu.org bug report #10786,
regarding 24.0.93; ruby-mode improperly handles symbols with keyword names in 
JS-style hashes
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
10786: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10786
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.0.93; ruby-mode improperly handles symbols with keyword names in JS-style hashes Date: Sat, 11 Feb 2012 04:27:33 +0400 User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1
Ruby 1.9 introduced the new syntax for hashes:

{key1: value1, key2: value2}

which is synonymous to {:key1 => value1, :key2 => value2}

The latest ruby-mode highlights the keywords in the new-style hashes properly, but fails to account for the case when the symbol's name is an otherwise reserved keyword. Examples:

link_to("root", root_path, class: "pink")

before_filter :do_stuff, if: :not_busy?

announce("The end is near!", end: "2012-12-31")

In all examples, the symbol (class, if, end) is being highlighted as a reserved keyword, and the indentation becomes broken on all lines below it.

There's a similar bug on the Ruby bug tracker:
http://bugs.ruby-lang.org/issues/5140

See attachment for the patch.

Attachment: ruby-keyword-symbols-patch.diff
Description: Text document


--- End Message ---
--- Begin Message --- Subject: Re: bug#10786: 24.0.93; ruby-mode improperly handles symbols with keyword names in JS-style hashes Date: Wed, 21 Mar 2012 14:33:28 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)
Thanks, installed,


        Stefan


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]