about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2023-01-30 12:08:51 -0600
committerCase Duckworth2023-01-30 12:08:51 -0600
commite586f57cb0b1a65dacbaca14364766d4f542ebf1 (patch)
treee52450b9236fd463bd03216b6b36b7ec789df60f /lisp
parentMahe (diff)
downloademacs-e586f57cb0b1a65dacbaca14364766d4f542ebf1.tar.gz
emacs-e586f57cb0b1a65dacbaca14364766d4f542ebf1.zip
Correct choose-executable
Diffstat (limited to 'lisp')
-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."