emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Matching programming language identifiers, not "words"


From: Tim Van Holder
Subject: Re: Matching programming language identifiers, not "words"
Date: Wed, 19 May 2004 08:06:55 +0200
User-agent: Mozilla Thunderbird 0.6 (Windows/20040502)

Jim Blandy wrote:

Here's the patch --- please test it.  Once we've got some positive
reports on it, I think it'll be ready to go in.


*** src/regex.c.~2~     2004-04-29 15:56:53.000000000 -0500
--- src/regex.c 2004-04-29 17:44:24.000000000 -0500
***************
*** 1095,1100 ****
--- 1098,1110 ----
        case wordend:
          printf ("/wordend");
+ case symbeg:
+         printf ("/symbeg");
+         break;
+ + case symend:
+         printf ("/symend");
+ case syntaxspec:
          printf ("/syntaxspec");
          mcnt = *p++;

This part seems suspect - I don't think the fall-through from wordend to symbeg is intentional. You may need to combine wordend and symend so both will fall through to syntaxspec (which
I assume is the intended behaviour).

*** man/search.texi.~1~ 2002-07-06 08:44:06.000000000 -0500
--- man/search.texi     2004-04-29 17:38:41.000000000 -0500
***************
*** 672,677 ****
--- 672,689 ----
 @item \W
 matches any character that is not a word-constituent.
+ @item \_<
+ matches the empty string, but only at the beginning of a symbol.  A
+ symbol is a sequence of one or more word or symbol constituent
+ characters.  @samp{\_<} matches at the beginning of the buffer only if
+ a symbol-constituent character follows.
perhaps a new term should be introduced for word+symbol - otherwise the last part of this paragraph would probably have to read "... if a word- or symbol-constituent character follows" to be
unambiguous.  The same goes for the \_> doc.

-- This e-mail was scanned by RAV Antivirus --





reply via email to

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