]> git.eshelyaron.com Git - emacs.git/commitdiff
Give a better error in locate-default-make-command-line
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 7 Feb 2022 00:59:18 +0000 (01:59 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 7 Feb 2022 03:58:49 +0000 (04:58 +0100)
* lisp/locate.el (locate-default-make-command-line): Error out
more nicely.

lisp/locate.el

index d4847b9c05082c5fc33c11c6fb4883f0dec1171b..20ef052184eeecc288b8dafc7eefe301e9f88ffd 100644 (file)
@@ -238,6 +238,8 @@ that is, with a prefix arg, you get the default behavior."
 ;; Functions
 
 (defun locate-default-make-command-line (search-string)
+  (unless (executable-find locate-command)
+    (error "Can't find the %s command" locate-command))
   (list locate-command search-string))
 
 (defun locate-word-at-point ()