branch: externals/urgrep commit 1172efb5a2a9d3858feba9f8dda53742116ba8e0 Author: Jim Porter <jporterb...@gmail.com> Commit: Jim Porter <jporterb...@gmail.com>
Don't allow using an unknown tool in `urgrep-command` --- urgrep.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/urgrep.el b/urgrep.el index a23803c409..e6f351613d 100644 --- a/urgrep.el +++ b/urgrep.el @@ -546,7 +546,8 @@ DIRECTORY: the directory to search in, or nil to use the (with-connection-local-variables (let* ((regexp-syntax (if (eq regexp t) urgrep-regexp-syntax regexp)) (files (if (listp files) files (list files))) - (tool (urgrep-get-tool tool)) + (tool (or (urgrep-get-tool tool) + (error "unknown tool %s" tool))) (tool-re-syntax (urgrep--get-best-syntax regexp-syntax tool)) (query (urgrep--convert-regexp query regexp-syntax tool-re-syntax)) (cmd-fun (urgrep--get-prop 'command-function tool)))