Function: semantic-ctxt-current-assignment-default

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

Signature

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

Documentation

Return the current assignment near the cursor at POINT.

By default, assume that "=" indicates an assignment.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/ctxt.el.gz
(defun semantic-ctxt-current-assignment-default (&optional point)
  "Return the current assignment near the cursor at POINT.
By default, assume that \"=\" indicates an assignment."
  (if point (goto-char point))
  (let ((case-fold-search semantic-case-fold))
    (with-syntax-table semantic-lex-syntax-table
      (condition-case nil
	  (semantic-with-buffer-narrowed-to-command
	    (save-excursion
	      (skip-chars-forward " \t=")
	      (condition-case nil (forward-char 1) (error nil))
	      (re-search-backward "[^=]=\\([^=]\\|$\\)")
	      ;; We are at an equals sign.  Go backwards a sexp, and
	      ;; we'll have the variable.  Otherwise we threw an error
	      (forward-sexp -1)
	      (semantic-ctxt-current-symbol)))
	(error nil)))))