From ad3ec429a12fb8caa460de5911145d1d3c46d626 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Thu, 15 Jun 2023 01:22:53 -0700 Subject: [PATCH] Fix treesit-install-language-grammar (bug#63990) * lisp/treesit.el: (treesit-install-language-grammar): When called non-interactively, out-dir should default to default-out-dir. --- lisp/treesit.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/treesit.el b/lisp/treesit.el index ea701ce1ff7..d79e7732387 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -3070,7 +3070,9 @@ nil, the grammar is installed to the standard location, the nil 'treesit--install-language-grammar-out-dir-history default-out-dir) - out-dir))) + ;; When called non-interactively, OUT-DIR should + ;; default to DEFAULT-OUT-DIR. + (or out-dir default-out-dir)))) (condition-case err (progn (apply #'treesit--install-language-grammar-1 -- 2.39.2