emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regex and case-fold-search problem


From: Kenichi Handa
Subject: Re: regex and case-fold-search problem
Date: Fri, 30 Aug 2002 10:11:51 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.1.30 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, "Stefan Monnier" <monnier+gnu/address@hidden> 
writes:
> Two things:

> - Neither `upper(lower(x)) = x' nor `lower(upper(x)) = x' are guaranteed.
> - The regexp matcher right now only has access to one of the two tables
>   (I believe it's the `lower' but I'm not even sure) and so two chars
>   are deemed to match if translate(a) = translate(b).

> The first might be a non-issue, I don't know.

There's an EQUIVALENCES table.  It seems that the documentation
of set-case-table says that:
  X and Y match in case-fold-search if:
      equiv(X) == Y
   or equiv(equiv(X)) == Y
   or equiv(equiv(equiv(X))) == Y
   or ...
Correct?

> The second is more serious because that means that if we want to use
> `upper' we'll need to somehow pass that table as well, which requires
> changing the interface to the reg-matching functions.

TRANSLATE table is passed as the member `tranlate' of
re_pattern_buffer.  Instead of setting it to lowercase
table, we can set it to the case-table itself that has
upcase, canon, and equiv tables in the extra slots.

Or, if we can use EQUIVALENCES table as above, what we need
is only that table.

---
Ken'ichi HANDA
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]