Function: senator-go-to-up-reference
senator-go-to-up-reference is an interactive and byte-compiled
function defined in senator.el.gz.
Signature
(senator-go-to-up-reference &optional TAG)
Documentation
Move up one reference from the current TAG.
A "reference" could be any interesting feature of TAG.
In C++, a function may have a parent which is non-local.
If that parent which is only a reference in the function tag
is found, we can jump to it.
Some tags such as includes have other reference features.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/senator.el.gz
;;;###autoload
(defun senator-go-to-up-reference (&optional tag)
"Move up one reference from the current TAG.
A \"reference\" could be any interesting feature of TAG.
In C++, a function may have a `parent' which is non-local.
If that parent which is only a reference in the function tag
is found, we can jump to it.
Some tags such as includes have other reference features."
(interactive)
(semantic-error-if-unparsed)
(let ((result (semantic-up-reference (or tag (semantic-current-tag)))))
(if (not result)
(error "No up reference found")
(push-mark)
(when (fboundp 'xref-push-marker-stack)
(xref-push-marker-stack))
(cond
;; A tag
((semantic-tag-p result)
(semantic-go-to-tag result)
(pop-to-buffer-same-window (current-buffer))
(semantic-momentary-highlight-tag result))
;; Buffers
((bufferp result)
(pop-to-buffer-same-window result)
(pulse-momentary-highlight-one-line (point)))
;; Files
((and (stringp result) (file-exists-p result))
(find-file result)
(pulse-momentary-highlight-one-line (point)))
(t
(error "Unknown result type from `semantic-up-reference'"))))))