Function: right-char

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

Signature

(right-char &optional N)

Documentation

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

On reaching beginning or end of buffer, stop and signal error.

If visual-order-cursor-movement is non-nil, this always moves to the right on display, wherever that is in the buffer. Otherwise, depending on the bidirectional context, this may move one position either forward or backward in the buffer. This is in contrast with C-f (forward-char) and C-b (backward-char), which see.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/bindings.el.gz
(defun right-char (&optional n)
  "Move point N characters to the right (to the left if N is negative).
On reaching beginning or end of buffer, stop and signal error.

If `visual-order-cursor-movement' is non-nil, this always moves
to the right on display, wherever that is in the buffer.
Otherwise, depending on the bidirectional context, this may move
one position either forward or backward in the buffer.  This is
in contrast with \\[forward-char] and \\[backward-char], which
see."
  (interactive "^p")
  (if visual-order-cursor-movement
      (dotimes (_ (if (numberp n) (abs n) 1))
	(move-point-visually (if (and (numberp n) (< n 0)) -1 1)))
    (if (eq (current-bidi-paragraph-direction) 'left-to-right)
	(forward-char n)
      (backward-char n))))