emacs-devel
[Top][All Lists]
Advanced

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

Re: isearch-allow-move [Was: isearch-allow-prefix]


From: Juri Linkov
Subject: Re: isearch-allow-move [Was: isearch-allow-prefix]
Date: Tue, 11 Jun 2013 22:35:53 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

> `isearch-symbol-regexp' requires the same changes
> that will make it a copy of `word-search-regexp'
> that uses "\\_<" and "\\_>" instead of "\\b".

But it also requires changing "\\W+" (used in `word-search-regexp')
to a regexp that doesn't match symbols.  IOW, in a word search
`word-search-regexp' uses the "\\W+" regexp to skip non-word characters,
so `isearch-symbol-regexp' needs to do the same to also skip non-symbol
characters.

Unfortunately I have no idea how to do this.

What is needed is a negation of the regexp "\\(\\sw\\|\\s_\\)+"
to match any character except the ones that have word syntax or
symbol syntax.

Naively I tried "[^\\sw\\s_]+" but it fails to work the same way
as it works for e.g. "[^[:word:]]".

Whereas (skip-syntax-forward "^w_") moves point across characters whose
syntax is not word or symbol, I see no way to do the same with a regexp.

Could someone please help me write a regexp that matches
a non-word non-symbol character?



reply via email to

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