Function: forward-symbol
forward-symbol is an interactive and byte-compiled function defined in
subr.el.gz.
Signature
(forward-symbol ARG)
Documentation
Move point to the next position that is the end of a symbol.
A symbol is any sequence of characters that are in either the word constituent or symbol constituent syntax class. With prefix argument ARG, do it ARG times if positive, or move backwards ARG times if negative.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/subr.el.gz
;; Symbols
(defun forward-symbol (arg)
"Move point to the next position that is the end of a symbol.
A symbol is any sequence of characters that are in either the
word constituent or symbol constituent syntax class.
With prefix argument ARG, do it ARG times if positive, or move
backwards ARG times if negative."
(interactive "^p")
(if (natnump arg)
(re-search-forward "\\(\\sw\\|\\s_\\)+" nil 'move arg)
(while (minusp arg)
(if (re-search-backward "\\(\\sw\\|\\s_\\)+" nil 'move)
(skip-syntax-backward "w_"))
(setq arg (1+ arg)))))