Function: ede-cpp-root-translate-file

ede-cpp-root-translate-file is a byte-compiled function defined in cpp-root.el.gz.

Signature

(ede-cpp-root-translate-file ARG &rest ARGS)

Implementations

(ede-cpp-root-translate-file (PROJ ede-cpp-root-project) FILENAME) in `ede/cpp-root.el'.

For PROJ, translate a user specified FILENAME. This is for project include paths and spp source files.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/ede/cpp-root.el.gz
(cl-defmethod ede-cpp-root-translate-file ((proj ede-cpp-root-project) filename)
  "For PROJ, translate a user specified FILENAME.
This is for project include paths and spp source files."
  ;; Step one: Root of this project.
  (let ((dir (file-name-directory (oref proj file))))

    ;; Step two: Analyze first char, and rehost
    (if (and (not (string= filename "")) (= (aref filename 0) ?/))
	;; Check relative to root of project
	(setq filename (expand-file-name (substring filename 1)
					 dir))
      ;; Relative to current directory.
      (setq filename (expand-file-name filename)))

    filename))