Function: pr-find-command

pr-find-command is a byte-compiled function defined in printing.el.gz.

Signature

(pr-find-command CMD)

Source Code

;; Defined in /usr/src/emacs/lisp/printing.el.gz
(defun pr-find-command (cmd)
  (if lpr-windows-system
      ;; windows system
      (let ((ext (cons (file-name-extension cmd t)
		       (list ".exe" ".bat" ".com")))
	    found)
	(setq cmd (file-name-sans-extension cmd))
	(while (and ext
		    (setq found (concat cmd (car ext)))
		    (not (and (file-regular-p found)
			      (file-executable-p found))))
	  (setq ext (cdr ext)
		found nil))
	found)
    ;; non-windows systems
    (and (file-regular-p cmd)
	 (file-executable-p cmd)
	 cmd)))