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


Message #49 received at 15874 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 15874 <at> debbugs.gnu.org, Bozhidar Batsov <bozhidar <at> batsov.com>
Subject: Re: bug#15874: 24.3.50; exit! not properly font-locked in ruby-mode
Date: Thu, 05 Dec 2013 23:57:49 -0500
> Not mandatory, just good for performance, AFAICT. Instead of maching all
> identifiers that look like methods and then finding out that most of
> them don't end with ? or ! anyway, it would be faster to scan the buffer
> for ? or !, and then look a bit back and see if the text before such a
> character resembles a method name.

We can also do that, using a "[?!]" regexp and then do the "look a bit
back" in Elisp.

> That looks good, but, like you mentioned later, if we had a dedicated
> backslash-sequence, it could also transparently handle the EOB case.
> I guess, the question is, would it see much use.

But then it would be a lot more special cased.

> `regexp-opt' seems to be the primary use case to me.

I think the second arg to `regexp-opt' is a misfeature.

> irb(main):026:0> a = 5
> => 5
> irb(main):027:0> a?3:4
> SyntaxError: (irb):27: syntax error, unexpected ':', expecting $end
> a?3:4
>     ^
> 	from /home/gutov/.rbenv/versions/1.9.3-p429/bin/irb:12:in `<main>'

Good.


        Stefan




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.