Function: forward-same-syntax

forward-same-syntax is an interactive and byte-compiled function defined in subr.el.gz.

Signature

(forward-same-syntax &optional ARG)

Documentation

Move point past all characters with the same 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
;;  Syntax blocks

(defun forward-same-syntax (&optional arg)
  "Move point past all characters with the same syntax class.
With prefix argument ARG, do it ARG times if positive, or move
backwards ARG times if negative."
  (interactive "^p")
  (or arg (setq arg 1))
  (while (minusp arg)
    (skip-syntax-backward
     (char-to-string (char-syntax (char-before))))
    (setq arg (1+ arg)))
  (while (plusp arg)
    (skip-syntax-forward (char-to-string (char-syntax (char-after))))
    (setq arg (1- arg))))