Function: semantic-ctxt-current-argument-default

semantic-ctxt-current-argument-default is a byte-compiled function defined in ctxt.el.gz.

Signature

(semantic-ctxt-current-argument-default &optional POINT)

Documentation

Return the index of the argument the cursor is on at POINT.

Depends on semantic-function-argument-separation-character.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/ctxt.el.gz
(defun semantic-ctxt-current-argument-default (&optional point)
  "Return the index of the argument the cursor is on at POINT.
Depends on `semantic-function-argument-separation-character'."
  (if point (goto-char point))
  (let ((case-fold-search semantic-case-fold))
    (with-syntax-table semantic-lex-syntax-table
      (when (semantic-ctxt-current-function)
	(save-excursion
	  ;; Only get the current arg index if we are in function args.
	  (let ((p (point))
		(idx 1))
	    (semantic-up-context)
	    (while (re-search-forward
		    (regexp-quote semantic-function-argument-separation-character)
		    p t)
	      (setq idx (1+ idx)))
	    idx))))))