[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: c-mode syntax strings and regexp word boundaries
From: |
Stefan Monnier |
Subject: |
Re: c-mode syntax strings and regexp word boundaries |
Date: |
Fri, 06 Sep 2013 10:07:24 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> (re-search-forward "^END\\b")
> (put-text-property (1- (point)) (point)
> 'syntax-table (string-to-syntax "|"))
This changes the syntax of this "D" from "w" to "|".
> (goto-char (point-min))
> (message "Search forward second time")
> (re-search-forward "^END\\b"))
The char before ";" is "D" which is not a word char any more, and the
";" is not a word char either, so the point between the two is not
a word boundary any more.
Stefan