Function: left-char

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

Signature

(left-char &optional N)

Documentation

Move point N characters to the left (to the right 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 left on display, wherever that is in the buffer. Otherwise, depending on the bidirectional context, this may move one position either backward or forward in the buffer. This is in contrast with C-f (forward-char) and C-b (backward-char), which see.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/bindings.el.gz
(defun left-char ( &optional n)
  "Move point N characters to the left (to the right 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 left on display, wherever that is in the buffer.
Otherwise, depending on the bidirectional context, this may move
one position either backward or forward 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)
	(backward-char n)
      (forward-char n))))