Function: c-end-of-token

c-end-of-token is a byte-compiled function defined in cc-engine.el.gz.

Signature

(c-end-of-token &optional BACK-LIMIT)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-engine.el.gz
(defun c-end-of-token (&optional back-limit)
  ;; Move to the end of the token we're just before or in the middle of.
  ;; BACK-LIMIT may be used to bound the backward search; if given it's
  ;; assumed to be at the boundary between two tokens.  Return non-nil if the
  ;; point is moved, nil otherwise.
  ;;
  ;; This function might do hidden buffer changes.
  (let ((start (point)))
    (cond ;; ((< (skip-syntax-backward "w_" (1- start)) 0)
     ;;  (skip-syntax-forward "w_"))
     ((> (skip-syntax-forward "w_") 0))
     ((< (skip-syntax-backward ".()" back-limit) 0)
      (while (< (point) start)
	(if (looking-at c-nonsymbol-token-regexp)
	    (goto-char (match-end 0))
	  ;; `c-nonsymbol-token-regexp' should always match since
	  ;; we've skipped backward over punctuation or paren
	  ;; syntax, but move forward in case it doesn't so that
	  ;; we don't leave point earlier than we started with.
	  (forward-char))))
     (t (if (looking-at c-nonsymbol-token-regexp)
	    (goto-char (match-end 0)))))
    (> (point) start)))