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

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

Signature

(semanticdb-find-translate-path-includes-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-includes-default (path)
  "Translate PATH into a list of semantic tables.
Default action as described in `semanticdb-find-translate-path'."
  (let ((table (cond ((null path)
		      semanticdb-current-table)
		     ((bufferp path)
		      (buffer-local-value 'semanticdb-current-table path))
		     ((and (stringp path) (file-exists-p path))
		      (semanticdb-file-table-object path t))
		     ((cl-typep path 'semanticdb-abstract-table)
		      path)
		     (t nil))))
    (if table
	;; If we were passed in something related to a TABLE,
	;; do a caching lookup.
	(let ((index (semanticdb-get-table-index table)))
	  (if (semanticdb-find-need-cache-update-p table)
	      ;; Let's go look up our indices.
	      (let ((ans (semanticdb-find-translate-path-includes--internal path)))
		(oset index include-path ans)
		;; Once we have our new indices set up, notify those
		;; who depend on us if we found something for them to
		;; depend on.
		(when ans (semanticdb-refresh-references table))
		ans)
	    ;; ELSE
	    ;;
	    ;; Just return the cache.
	    (oref index include-path)))
      ;; If we were passed in something like a tag list, or other boring
      ;; searchable item, then instead do the regular thing without caching.
      (semanticdb-find-translate-path-includes--internal path))))