aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÓscar Fuentes2021-12-27 16:01:09 +0100
committerÓscar Fuentes2021-12-27 16:05:19 +0100
commitea65de757766fa4cb5a090012e2f6a0aeef0b9f8 (patch)
tree77d1fa0cf6d1d7c2c7c2d1a87790524eb66fd368
parentd4e2850b323fdce7b4d658ece50f6071432deae8 (diff)
downloademacs-ea65de757766fa4cb5a090012e2f6a0aeef0b9f8.tar.gz
emacs-ea65de757766fa4cb5a090012e2f6a0aeef0b9f8.zip
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."
382 (setq val (number-to-string val))) 382 (setq val (number-to-string val)))
383 ;; expand .../ etc that only eshell understands to 383 ;; expand .../ etc that only eshell understands to
384 ;; standard ../../ 384 ;; standard ../../
385 ((string-match "\\.\\.\\.+/" val) 385 ((and (stringp val)) (string-match "\\.\\.\\.+/" val)
386 (setq val (eshell-expand-multiple-dots val)))) 386 (setq val (eshell-expand-multiple-dots val))))
387 (or val ""))) 387 (or val "")))
388 args) 388 args)