Function: backward-word

backward-word is an interactive and byte-compiled function defined in simple.el.gz.

Signature

(backward-word &optional ARG)

Documentation

Move backward until encountering the beginning of a word.

With argument ARG, do this that many times. If ARG is omitted or nil, move point backward one word.

The word boundaries are normally determined by the buffer's syntax table and character script (according to char-script-table), but find-word-boundary-function-table, such as set up by subword-mode(var)/subword-mode(fun), can change that. If a Lisp program needs to move by words determined strictly by the syntax table, it should use backward-word-strictly instead. See Info node (elisp) Word Motion for details.

View in manual

Probably introduced at or before Emacs version 22.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun backward-word (&optional arg)
  "Move backward until encountering the beginning of a word.
With argument ARG, do this that many times.
If ARG is omitted or nil, move point backward one word.

The word boundaries are normally determined by the buffer's
syntax table and character script (according to
`char-script-table'), but `find-word-boundary-function-table',
such as set up by `subword-mode', can change that.  If a Lisp
program needs to move by words determined strictly by the syntax
table, it should use `backward-word-strictly' instead.  See Info
node `(elisp) Word Motion' for details."
  (interactive "^p")
  (forward-word (- (or arg 1))))