aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/cedet/semantic/scope.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/cedet/semantic/scope.el b/lisp/cedet/semantic/scope.el
index 9bade569659..272f37d9858 100644
--- a/lisp/cedet/semantic/scope.el
+++ b/lisp/cedet/semantic/scope.el
@@ -767,6 +767,16 @@ The class returned from the scope calculation is variable
767 ;; can reset the scope cache without affecting others. 767 ;; can reset the scope cache without affecting others.
768 (clone scopecache))))) 768 (clone scopecache)))))
769 769
770(defun semantic-calculate-scope-for-tag (tag)
771 "Calculate the current scope that is around TAG.
772Return nil if TAG has no position, or we cannot otherwise find a scope.
773Use this when pulling a datatype off TAG so when it is looked up
774it has the right context around it."
775 (save-current-buffer
776 (when (semantic-tag-with-position-p tag)
777 (semantic-go-to-tag tag)
778 (semantic-calculate-scope (point)))) )
779
770(defun semantic-scope-find (name &optional class scope-in) 780(defun semantic-scope-find (name &optional class scope-in)
771 "Find the tag with NAME, and optional CLASS in the current SCOPE-IN. 781 "Find the tag with NAME, and optional CLASS in the current SCOPE-IN.
772Searches various elements of the scope for NAME. Return ALL the 782Searches various elements of the scope for NAME. Return ALL the