emacs-devel
[Top][All Lists]
Advanced

[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




reply via email to

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