diff options
| -rw-r--r-- | lisp/cedet/semantic/scope.el | 10 |
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. | ||
| 772 | Return nil if TAG has no position, or we cannot otherwise find a scope. | ||
| 773 | Use this when pulling a datatype off TAG so when it is looked up | ||
| 774 | it 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. |
| 772 | Searches various elements of the scope for NAME. Return ALL the | 782 | Searches various elements of the scope for NAME. Return ALL the |