Subject: bug#9681: Broken behaviour of re-search-backward (.+ matching only a single character)

From: Kenichi Handa <[email-masked]>
Date: Tue, 11 Oct 2011 11:03:26 +0900

In article <[email-masked]>, Stefan Monnier <[email-masked]> writes:

> It's not the ideal behavior, admittedly.  It's even more obvious in
> `looking-back'.  But fixing it would require the implementation of
> a backward regexp matcher.

FYI, in Mule (the version before integrating into Emacs), we
implemented such a feature by doing these:

  o Regular expression compiler written in Elisp which
    generates both forward matching and backward matching
    compiled patterns.

  o Modify regex.c to accept the above patterns and do
    backward matching if necessary.

I vaguely remember that I discussed this feature with RMS
when we were going to integrate Mule's multilingual feature
into Emacs, and it was rejected because it's not related to
multilingual feature.  And actually, that feature had been
used very rarely.

---
Kenichi Handa
[email-masked]