summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÓscar Fuentes <ofv@wanadoo.es>2021-12-27 16:01:09 +0100
committerÓscar Fuentes <ofv@wanadoo.es>2021-12-27 16:05:19 +0100
commitea65de757766fa4cb5a090012e2f6a0aeef0b9f8 (patch)
tree77d1fa0cf6d1d7c2c7c2d1a87790524eb66fd368
parentd4e2850b323fdce7b4d658ece50f6071432deae8 (diff)
downloademacs-ea65de757766fa4cb5a090012e2f6a0aeef0b9f8.tar.gz
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.
-rw-r--r--lisp/eshell/em-cmpl.el2
1 files changed, 1 insertions, 1 deletions
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)