Function: forward-whitespace

forward-whitespace is an interactive and byte-compiled function defined in subr.el.gz.

Signature

(forward-whitespace ARG)

Documentation

Move point to the end of the next sequence of whitespace chars.

Each such sequence may be a single newline, or a sequence of consecutive space and/or tab characters. With prefix argument ARG, do it ARG times if positive, or move backwards ARG times if negative.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
;;  Whitespace

(defun forward-whitespace (arg)
  "Move point to the end of the next sequence of whitespace chars.
Each such sequence may be a single newline, or a sequence of
consecutive space and/or tab characters.
With prefix argument ARG, do it ARG times if positive, or move
backwards ARG times if negative."
  (interactive "^p")
  (if (natnump arg)
      (re-search-forward "[ \t]+\\|\n" nil 'move arg)
    (while (< arg 0)
      (if (re-search-backward "[ \t]+\\|\n" nil 'move)
	  (or (eq (char-after (match-beginning 0)) ?\n)
	      (skip-chars-backward " \t")))
      (setq arg (1+ arg)))))