Function: semantic-end-of-context-default

semantic-end-of-context-default is a byte-compiled function defined in ctxt.el.gz.

Signature

(semantic-end-of-context-default &optional POINT)

Documentation

Move POINT to the end of the current context via parenthesis.

Return non-nil if there is no upper context.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/ctxt.el.gz
(defun semantic-end-of-context-default (&optional point)
  "Move POINT to the end of the current context via parenthesis.
Return non-nil if there is no upper context."
  (if point (goto-char point))
  (let ((start (point)))
    (if (semantic-up-context)
	t
      ;; Go over the list, and back over the end parenthesis.
      (condition-case nil
	  (progn
	    (forward-sexp 1)
	    (forward-char -1))
	(error
	 ;; If an error occurs, get the current tag from the cache,
	 ;; and just go to the end of that.  Make sure we end up at least
	 ;; where start was so parse-region type calls work.
	 (if (semantic-current-tag)
	     (progn
	       (goto-char (semantic-tag-end (semantic-current-tag)))
	       (when (< (point) start)
		 (goto-char start)))
	   (goto-char start))
	 t)))
    nil))