Function: ffap-kpathsea-expand-path

ffap-kpathsea-expand-path is a byte-compiled function defined in ffap.el.gz.

Signature

(ffap-kpathsea-expand-path PATH)

Documentation

Replace each "//"-suffixed dir in PATH by a list of its subdirs.

The subdirs begin with the original directory, and the depth of the search is bounded by ffap-kpathsea-depth. This is intended to mimic kpathsea, a library used by some versions of TeX.

Source Code

;; Defined in /usr/src/emacs/lisp/ffap.el.gz
(defun ffap-kpathsea-expand-path (path)
  "Replace each \"//\"-suffixed dir in PATH by a list of its subdirs.
The subdirs begin with the original directory, and the depth of the
search is bounded by `ffap-kpathsea-depth'.  This is intended to mimic
kpathsea, a library used by some versions of TeX."
  (apply #'nconc
	 (mapcar
          (lambda (dir)
            (if (string-match "[^/]//\\'" dir)
                (ffap-all-subdirs (substring dir 0 -2) ffap-kpathsea-depth)
              (list dir)))
	  path)))