Extract program name from inferior-lisp-program

Many users of sly also use roswell and set the inferior-lisp-program to
values like "ros run" or "ros -Q run". This is not detected correctly by
executable-find. Hence we try to extract the first part of the program
name.
This commit is contained in:
Markus Klink 2021-02-02 15:03:54 +01:00
parent 3a7be7bb4f
commit f978913e40

View file

@ -1,6 +1,7 @@
;;; lang/common-lisp/doctor.el -*- lexical-binding: t; -*-
(when (require 'sly nil t)
(unless (executable-find inferior-lisp-program)
(warn! "Couldn't find your `inferior-lisp-program' (%s). Is it installed?"
inferior-lisp-program)))
(let ((prog-name (car (split-string inferior-lisp-program))))
(unless (executable-find prog-name)
(warn! "Couldn't find your `inferior-lisp-program' (%s). Is it installed?"
inferior-lisp-program))))