Function: evil-forward-syntax

evil-forward-syntax is a byte-compiled function defined in evil-common.el.

Signature

(evil-forward-syntax SYNTAX &optional COUNT)

Documentation

Move point to the end or beginning of a sequence of characters in SYNTAX.

Stop on reaching a character not in SYNTAX.

Source Code

;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-common.el
(defun evil-forward-syntax (syntax &optional count)
  "Move point to the end or beginning of a sequence of characters in SYNTAX.
Stop on reaching a character not in SYNTAX."
  (let ((notsyntax (if (= (aref syntax 0) ?^)
                       (substring syntax 1)
                     (concat "^" syntax))))
    (evil-motion-loop (dir (or count 1))
      (cond
       ((< dir 0)
        (skip-syntax-backward notsyntax)
        (skip-syntax-backward syntax))
       (t
        (skip-syntax-forward notsyntax)
        (skip-syntax-forward syntax))))))