diff options
author | Case Duckworth | 2023-01-30 12:08:51 -0600 |
---|---|---|
committer | Case Duckworth | 2023-01-30 12:08:51 -0600 |
commit | e586f57cb0b1a65dacbaca14364766d4f542ebf1 (patch) | |
tree | e52450b9236fd463bd03216b6b36b7ec789df60f | |
parent | Mahe (diff) | |
download | emacs-e586f57cb0b1a65dacbaca14364766d4f542ebf1.tar.gz emacs-e586f57cb0b1a65dacbaca14364766d4f542ebf1.zip |
Correct choose-executable
-rw-r--r-- | lisp/acdw.el | 9 |
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." | |||
34 | Each of PROGRAMS can be a single string, or a list. If it's a list then its car | 34 | Each of PROGRAMS can be a single string, or a list. If it's a list then its car |
35 | will be tested with `executable-find', and the entire list returned. This | 35 | will be tested with `executable-find', and the entire list returned. This |
36 | enables passing arguments to a calling function." | 36 | enables 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." |