diff options
author | Chong Yidong <cyd@gnu.org> | 2012-10-02 02:10:29 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-10-02 02:10:29 +0800 |
commit | 62a81506f802e4824b718cc30321ee3a0057cdf7 (patch) | |
tree | d681d7b767b1c3f7e4aee24ce39f6bef0d7f1f7e /lisp/cedet/semantic/analyze/refs.el | |
parent | b3317662acc0157406c20c8e14c43b7126eaa8a0 (diff) | |
download | emacs-62a81506f802e4824b718cc30321ee3a0057cdf7.tar.gz |
Update CEDET from upstream.
Diffstat (limited to 'lisp/cedet/semantic/analyze/refs.el')
-rw-r--r-- | lisp/cedet/semantic/analyze/refs.el | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/cedet/semantic/analyze/refs.el b/lisp/cedet/semantic/analyze/refs.el index 09a4c08c059..05ac56eac69 100644 --- a/lisp/cedet/semantic/analyze/refs.el +++ b/lisp/cedet/semantic/analyze/refs.el @@ -87,7 +87,7 @@ Use `semantic-analyze-current-tag' to debug this fcn." (semantic-go-to-tag tag db) (setq scope (semantic-calculate-scope)) - (setq allhits (semantic--analyze-refs-full-lookup tag scope)) + (setq allhits (semantic--analyze-refs-full-lookup tag scope t)) (semantic-analyze-references (semantic-tag-name tag) :tag tag @@ -115,7 +115,10 @@ Optional argument IN-BUFFER indicates that the returned tag should be in an acti (aDB (car ans)) ) (when (and (not (semantic-tag-prototype-p aT)) - (semantic-tag-similar-p tag aT :prototype-flag :parent)) + (semantic-tag-similar-p tag aT + :prototype-flag + :parent + :typemodifiers)) (when in-buffer (save-excursion (semantic-go-to-tag aT aDB))) (push aT impl)))) allhits) @@ -135,7 +138,10 @@ Optional argument IN-BUFFER indicates that the returned tag should be in an acti (aDB (car ans)) ) (when (and (semantic-tag-prototype-p aT) - (semantic-tag-similar-p tag aT :prototype-flag :parent)) + (semantic-tag-similar-p tag aT + :prototype-flag + :parent + :typemodifiers)) (when in-buffer (save-excursion (semantic-go-to-tag aT aDB))) (push aT proto)))) allhits) @@ -143,14 +149,15 @@ Optional argument IN-BUFFER indicates that the returned tag should be in an acti ;;; LOOKUP ;; -(defun semantic--analyze-refs-full-lookup (tag scope) +(defun semantic--analyze-refs-full-lookup (tag scope &optional noerror) "Perform a full lookup for all occurrences of TAG in the current project. TAG should be the tag currently under point. SCOPE is the scope the cursor is in. From this a list of parents is -derived. If SCOPE does not have parents, then only a simple lookup is done." +derived. If SCOPE does not have parents, then only a simple lookup is done. +Optional argument NOERROR means don't error if the lookup fails." (if (not (oref scope parents)) ;; If this tag has some named parent, but is not - (semantic--analyze-refs-full-lookup-simple tag) + (semantic--analyze-refs-full-lookup-simple tag noerror) ;; We have some sort of lineage we need to consider when we do ;; our side lookup of tags. |