Function: semantic-analyze-proto-impl-toggle

semantic-analyze-proto-impl-toggle is an autoloaded, interactive and byte-compiled function defined in refs.el.gz.

Signature

(semantic-analyze-proto-impl-toggle)

Documentation

Toggle between the implementation, and a prototype of tag under point.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/analyze/refs.el.gz
;;;###autoload
(defun semantic-analyze-proto-impl-toggle ()
  "Toggle between the implementation, and a prototype of tag under point."
  (interactive)
  (require 'semantic/decorate)
  (semantic-fetch-tags)
  (let* ((tag (semantic-current-tag))
	 (sar (if tag
		  (semantic-analyze-tag-references tag)
		(error "Point must be in a declaration")))
	 (target (if (semantic-tag-prototype-p tag)
		     (car (semantic-analyze-refs-impl sar t))
		   (car (semantic-analyze-refs-proto sar t))))
	 )

    (when (not target)
      (error "Could not find suitable %s"
	     (if (semantic-tag-prototype-p tag) "implementation" "prototype")))

    (push-mark)
    (when (fboundp 'xref-push-marker-stack)
      (xref-push-marker-stack))
    (semantic-go-to-tag target)
    (pop-to-buffer-same-window (current-buffer))
    (semantic-momentary-highlight-tag target))
  )