[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15874: 24.3.50; exit! not properly font-locked in ruby-mode
From: |
Stefan Monnier |
Subject: |
bug#15874: 24.3.50; exit! not properly font-locked in ruby-mode |
Date: |
Thu, 05 Dec 2013 23:57:49 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> 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
bug#15874: 24.3.50; exit! not properly font-locked in ruby-mode, Kevin Rodgers, 2013/12/05