Function: semantic-find-tags-by-scope-protection-c-mode
semantic-find-tags-by-scope-protection-c-mode is a byte-compiled
function defined in c.el.gz.
Signature
(semantic-find-tags-by-scope-protection-c-mode SCOPEPROTECTION PARENT &optional TABLE)
Documentation
Override the usual search for protection.
We can be more effective than the default by scanning through once,
and collecting tags based on the labels we see along the way.
Override semantic-find-tags-by-scope-protection in c-mode buffers.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/bovine/c.el.gz
(define-mode-local-override semantic-find-tags-by-scope-protection
c-mode (scopeprotection parent &optional table)
"Override the usual search for protection.
We can be more effective than the default by scanning through once,
and collecting tags based on the labels we see along the way."
(if (not table) (setq table (semantic-tag-type-members parent)))
(if (null scopeprotection)
table
(let ((ans nil)
(curprot 1)
(targetprot (cond ((eq scopeprotection 'public)
1)
((eq scopeprotection 'protected)
2)
(t 3)
))
(alist '(("public" . 1)
("protected" . 2)
("private" . 3)))
)
(dolist (tag table)
(cond
((semantic-tag-of-class-p tag 'label)
(setq curprot (cdr (assoc (semantic-tag-name tag) alist)))
)
((>= targetprot curprot)
(setq ans (cons tag ans)))
))
ans)))