views:

55

answers:

2

hello

I am trying to implement function which moves to the next blank/whitespace character. I have read manual, and it seems I can use skip-syntax functions. However, I cannot figure out how to use them correctly. Here is what I have:

(skip-syntax-forward " ")

However, this does not seem to work. If I use "^ " it works, but if point is one blank character already, points does not move forward.

What is the correct usage?

+2  A: 
(skip-syntax-forward "^-")
offby1
hi. Can you explain significance of "^" please? is it regular expression or something else?
aaa
from the help for skip-syntax-forward: "If syntax starts with ^, skip characters whose syntax is NOT in syntax."
giorgian
+4  A: 
(when (= 0 (skip-syntax-forward "^ ")) 
  (skip-syntax-forward " ") 
  (skip-syntax-forward "^ "))
giorgian