about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lisp/acdw.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 3b178db..46079f6 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -34,9 +34,12 @@ be created."
34Each of PROGRAMS can be a single string, or a list. If it's a list then its car 34Each of PROGRAMS can be a single string, or a list. If it's a list then its car
35will be tested with `executable-find', and the entire list returned. This 35will be tested with `executable-find', and the entire list returned. This
36enables passing arguments to a calling function." 36enables passing arguments to a calling function."
37 (seq-find (lambda (x) 37 (catch 'found
38 (executable-find (car (ensure-list x)))) 38 (dolist (prog programs)
39 programs)) 39 (let ((exec (executable-find (car (ensure-list prog))))
40 (args (cdr-safe prog)))
41 (when exec
42 (throw 'found (if args (cons exec args) exec)))))))
40 43
41(defun file-string (file) 44(defun file-string (file)
42 "Return the contents of FILE as a string." 45 "Return the contents of FILE as a string."