all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 15874@debbugs.gnu.org, Bozhidar Batsov <bozhidar@batsov.com>
Subject: bug#15874: 24.3.50; exit! not properly font-locked in ruby-mode
Date: Thu, 05 Dec 2013 23:57:49 -0500	[thread overview]
Message-ID: <jwvtxema8a2.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <87a9ge7l5q.fsf@yandex.ru> (Dmitry Gutov's message of "Fri, 06 Dec 2013 04:44:49 +0200")

> 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





  reply	other threads:[~2013-12-06  4:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-12 12:38 bug#15874: 24.3.50; exit! not properly font-locked in ruby-mode Bozhidar Batsov
2013-12-04 18:31 ` Dmitry Gutov
2013-12-04 19:20   ` Stefan Monnier
2013-12-04 22:33     ` Dmitry Gutov
2013-12-04 23:15     ` Dmitry Gutov
2013-12-05  2:50       ` Stefan Monnier
2013-12-05  3:42         ` Dmitry Gutov
2013-12-05 19:02           ` Stefan Monnier
2013-12-06  2:44             ` Dmitry Gutov
2013-12-06  4:57               ` Stefan Monnier [this message]
2013-12-06  4:23             ` Dmitry Gutov
2013-12-05  6:34   ` Kevin Rodgers
2013-12-05 10:58     ` Dmitry Gutov
2013-12-05 14:50       ` Kevin Rodgers
2013-12-05 17:25         ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvtxema8a2.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=15874@debbugs.gnu.org \
    --cc=bozhidar@batsov.com \
    --cc=dgutov@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.