Take the 2-minute tour ×

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?

share|improve this question

2 Answers 2

up vote 4 down vote accepted
(when (= 0 (skip-syntax-forward "^ ")) 
  (skip-syntax-forward " ") 
  (skip-syntax-forward "^ "))
share|improve this answer
(skip-syntax-forward "^-")
share|improve this answer
hi. Can you explain significance of "^" please? is it regular expression or something else? –  Anycorn Feb 14 '10 at 0:24
from the help for skip-syntax-forward: "If syntax starts with ^, skip characters whose syntax is NOT in syntax." –  giorgian Feb 14 '10 at 0:25

Your Answer


