Function: right-word

right-word is an interactive and byte-compiled function defined in bindings.el.gz.

Signature

(right-word &optional N)

Documentation

Move point N words to the right (to the left if N is negative).

Depending on the bidirectional context, this may move either forward or backward in the buffer. This is in contrast with M-f (forward-word) and M-b (backward-word), which see.

Value is normally t. If an edge of the buffer or a field boundary is reached, point is left there and the function returns nil. Field boundaries are not noticed if inhibit-field-text-motion is non-nil.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/bindings.el.gz
(defun right-word (&optional n)
  "Move point N words to the right (to the left if N is negative).

Depending on the bidirectional context, this may move either forward
or backward in the buffer.  This is in contrast with \\[forward-word]
and \\[backward-word], which see.

Value is normally t.
If an edge of the buffer or a field boundary is reached, point is left there
and the function returns nil.  Field boundaries are not noticed
if `inhibit-field-text-motion' is non-nil."
  (interactive "^p")
  (if (eq (current-bidi-paragraph-direction) 'left-to-right)
      (forward-word n)
    (backward-word n)))