Function: semanticdb-find-result-nth-in-buffer

semanticdb-find-result-nth-in-buffer is an autoloaded and byte-compiled function defined in db-find.el.gz.

Signature

(semanticdb-find-result-nth-in-buffer RESULT N)

Documentation

In RESULT, return the Nth search result.

Like semanticdb-find-result-nth, except that only the TAG is returned, and the buffer it is found it will be made current. If the result tag has no position information, the originating buffer is still made current.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/db-find.el.gz
;;;###autoload
(defun semanticdb-find-result-nth-in-buffer (result n)
  "In RESULT, return the Nth search result.
Like `semanticdb-find-result-nth', except that only the TAG
is returned, and the buffer it is found it will be made current.
If the result tag has no position information, the originating buffer
is still made current."
  (let* ((ret (semanticdb-find-result-nth result n))
	 (ans (car ret))
	 (anstable (cdr ret)))
    ;; If we have a hit, double-check the find-file
    ;; entry.  If the file must be loaded, then gat that table's
    ;; source file into a buffer.

    (if anstable
	(let ((norm (semanticdb-normalize-one-tag anstable ans)))
	  (when norm
	    ;; The normalized tags can now be found based on that
	    ;; tags table.
	    (condition-case nil
		(progn
		  (semanticdb-set-buffer (car norm))
		  ;; Now reset ans
		  (setq ans (cdr norm)))
	      ;; Don't error for this case, but don't store
	      ;; the thing either.
	      (no-method-definition nil))
	    ))
      )
    ;; Return the tag.
    ans))