Function: tex-executable-exists-p

tex-executable-exists-p is a byte-compiled function defined in tex-mode.el.gz.

Signature

(tex-executable-exists-p NAME)

Documentation

Like executable-find but with a cache.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/tex-mode.el.gz
(defun tex-executable-exists-p (name)
  "Like `executable-find' but with a cache."
  (let ((f (and (string-match "^\\\\\\([^ \t\n]+\\)" name)
                (intern-soft (concat "tex-cmd-" (match-string 1 name))))))
    (if (fboundp f)
        f
      (let ((cache (assoc name tex-executable-cache)))
        (if cache (cdr cache)
          (let ((executable (executable-find name)))
            (push (cons name executable) tex-executable-cache)
            executable))))))