GNU bug report logs - #15874
24.3.50; exit! not properly font-locked in ruby-mode

Previous Next

Package: emacs;

Reported by: Bozhidar Batsov <bozhidar <at> batsov.com>

Date: Tue, 12 Nov 2013 12:40:01 UTC

Severity: minor

Found in version 24.3.50

Fixed in version 24.4

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 15874 <at> debbugs.gnu.org, Bozhidar Batsov <bozhidar <at> batsov.com>
Subject: bug#15874: 24.3.50; exit! not properly font-locked in ruby-mode
Date: Thu, 05 Dec 2013 01:15:37 +0200
On 04.12.2013 21:20, Stefan Monnier wrote:
>> I'm not sure we want to move `!' to the symbol syntax class.
>
> How is the Ruby lexing done w.r.t identifiers and ! (and ?) ?

To answer your actual question: Ruby considers ! and ? parts of 
identifiers only in method names, and only when the name ends with one 
such a character.

The names of local variables, as well as instance and global ones, can't 
use ? and !. We may want to handle this eventually:

irb(main):001:0> @abc?1:2
=> 2

irb(main):002:0> abc = 1
=> 1
irb(main):003:0> abc?2:3
SyntaxError: (irb):3: syntax error, unexpected ':', expecting $end





This bug report was last modified 11 years and 165 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.