Function: forward-to-word

forward-to-word is an autoloaded, interactive and byte-compiled function defined in misc.el.gz.

Signature

(forward-to-word &optional ARG)

Documentation

Move forward until encountering the beginning of the ARGth word.

ARG defaults to 1. When called interactively, ARG is the prefix numeric argument.

Probably introduced at or before Emacs version 17.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/misc.el.gz
;;;###autoload
(defun forward-to-word (&optional arg)
  "Move forward until encountering the beginning of the ARGth word.
ARG defaults to 1.  When called interactively, ARG is the prefix
numeric argument."
  (interactive "^p")
  (unless arg (setq arg 1))
  (or (re-search-forward (if (> arg 0) "\\W\\b" "\\b\\W") nil t arg)
      (goto-char (if (> arg 0) (point-max) (point-min)))))