From ea65de757766fa4cb5a090012e2f6a0aeef0b9f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=93scar=20Fuentes?= Date: Mon, 27 Dec 2021 16:01:09 +0100 Subject: [PATCH] eshell-complete-parse-arguments: don't use string-match on a list When there is more than one candidate for completion, `val' is a list. Fixes bug#52794. * lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): protect use of string-match with stringp. --- lisp/eshell/em-cmpl.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index 4fd0afbeb88..96ec031fba6 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el @@ -382,7 +382,7 @@ to writing a completion function." (setq val (number-to-string val))) ;; expand .../ etc that only eshell understands to ;; standard ../../ - ((string-match "\\.\\.\\.+/" val) + ((and (stringp val)) (string-match "\\.\\.\\.+/" val) (setq val (eshell-expand-multiple-dots val)))) (or val ""))) args) -- 2.39.2