Function: semanticdb-find-translate-path-brutish-default

semanticdb-find-translate-path-brutish-default is a byte-compiled function defined in db-find.el.gz.

Signature

(semanticdb-find-translate-path-brutish-default PATH)

Documentation

Translate PATH into a list of semantic tables.

Default action as described in semanticdb-find-translate-path.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/db-find.el.gz
(defun semanticdb-find-translate-path-brutish-default (path)
  "Translate PATH into a list of semantic tables.
Default action as described in `semanticdb-find-translate-path'."
  (let ((basedb
	 (cond ((null path) semanticdb-current-database)
	       ((semanticdb-table-p path) (oref path parent-db))
	       (t (let ((tt (semantic-something-to-tag-table path)))
		    (if tt
			;; @todo - What does this DO ??!?!
			(with-current-buffer (semantic-tag-buffer (car tt))
			  semanticdb-current-database)
		      semanticdb-current-database))))))
    (apply
     #'nconc
     (mapcar
      (lambda (db)
	(let ((tabs (semanticdb-get-database-tables db))
	      (ret nil))
	  ;; Only return tables of the same language (major-mode)
	  ;; as the current search environment.
	  (while tabs

	    (semantic-throw-on-input 'translate-path-brutish)

	    (if (semanticdb-equivalent-mode-for-search (car tabs)
						       (current-buffer))
		(setq ret (cons (car tabs) ret)))
	    (setq tabs (cdr tabs)))
	  ret))
      ;; FIXME:
      ;; This should scan the current project directory list for all
      ;; semanticdb files, perhaps handling proxies for them.
      (semanticdb-current-database-list
       (if basedb (oref basedb reference-directory)
	 default-directory))))
    ))