[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-28 ea65de7577: eshell-complete-parse-arguments: don't use string-m
From: |
Oscar Fuentes |
Subject: |
emacs-28 ea65de7577: eshell-complete-parse-arguments: don't use string-match on a list |
Date: |
Mon, 27 Dec 2021 10:06:30 -0500 (EST) |
branch: emacs-28
commit ea65de757766fa4cb5a090012e2f6a0aeef0b9f8
Author: Óscar Fuentes <ofv@wanadoo.es>
Commit: Óscar Fuentes <ofv@wanadoo.es>
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 4fd0afbeb8..96ec031fba 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-28 ea65de7577: eshell-complete-parse-arguments: don't use string-match on a list,
Oscar Fuentes <=