[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Make \< and \> match symbol boundaries
From: |
Stefan Monnier |
Subject: |
Make \< and \> match symbol boundaries |
Date: |
Thu, 25 Oct 2001 01:43:10 -0400 |
I think we should change the definition of \< and \> in regexp
to match symbol-boundaries instead of word-boundaries.
I've been running with such a change without encountering any problem,
which indicates that the backward compatibility might be acceptable.
The reason why I suggest such a change is twofold:
1 - a lot of code to setup imenu regexps or font-lock regexps goes through
the trouble of using a special syntax-table where all symbol constituents
are turned into word-constituents so that \< and \> can be used
meaningfully. Actually, it seems to be almost the only use of
font-lock-syntax-table.
2 - I often need to search for a occurences of a symbol and the
word-boundaries aren't quite what I want in C-u C-s so I end
up with spurious matches for <symbol>_<blabla>.
The only problem I can see is backward compatibility (since matching
word boundaries can still be done with \b), but I can't seem to come
up with any real case where compatibility is broken.
Stefan
- Re: idea -> internal frames?, (continued)
- Re: idea -> internal frames?, Richard Stallman, 2001/10/28
- Re: idea -> internal frames?, Per Abrahamsen, 2001/10/28
- Re: idea -> internal frames?, Richard Stallman, 2001/10/29
- Re: idea -> internal frames?, Per Abrahamsen, 2001/10/30
- Re: idea -> internal frames?, Richard Stallman, 2001/10/31
- Re[2]: idea -> internal frames?, Eric M. Ludlam, 2001/10/31
Re: idea -> internal frames?, Jason Rumney, 2001/10/26
Re: idea -> internal frames?, Kevin A. Burton, 2001/10/24
- Make \< and \> match symbol boundaries,
Stefan Monnier <=
- Re: Make \< and \> match symbol boundaries, Miles Bader, 2001/10/25
- Re: Make \< and \> match symbol boundaries, Richard Stallman, 2001/10/28
- Re: Make \< and \> match symbol boundaries, Paul Eggert, 2001/10/28
- Re: Make \< and \> match symbol boundaries, Richard Stallman, 2001/10/29
- Re: Make \< and \> match symbol boundaries, Miles Bader, 2001/10/29
Re: Make \< and \> match symbol boundaries, Stefan Monnier, 2001/10/28
Re: Make \< and \> match symbol boundaries, Paul Eggert, 2001/10/28
Re: Make \< and \> match symbol boundaries, Stefan Monnier, 2001/10/28
Re: Make \< and \> match symbol boundaries, Miles Bader, 2001/10/29