diff options
author | Jim Porter <jporterbugs@gmail.com> | 2023-02-23 15:13:38 -0800 |
---|---|---|
committer | Jim Porter <jporterbugs@gmail.com> | 2023-02-23 15:13:38 -0800 |
commit | 0a361fd91abfc34cffad61fcc552a7cd64126f12 (patch) | |
tree | da1cfbeed45b17ab9a4edfde9eb8e88b6cc5be8a | |
parent | da002af4116247ce63dcba414bc059457f6074e4 (diff) | |
download | emacs-0a361fd91abfc34cffad61fcc552a7cd64126f12.tar.gz |
; Return t or nil for 'test-completion' of Eshell user references
* lisp/eshell/em-dirs.el (eshell-complete-user-reference): Simply call
'test-completion' when ACTION is 'lambda'; don't modify the result.
-rw-r--r-- | lisp/eshell/em-dirs.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index b47bd12c0f0..eb679b80cb5 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el @@ -290,10 +290,10 @@ Thus, this does not include the current directory.") (throw 'pcomplete-completions ;; Provide a programmed completion table. This works ;; just like completing over the list of names, except - ;; it always returns the completed string, never `t'. - ;; That's because this is only completing a directory - ;; name, and so the completion isn't actually finished - ;; yet. + ;; it always returns the completed string for + ;; `try-completion', never `t'. That's because this is + ;; only completing a directory name, and so the + ;; completion isn't actually finished yet. (lambda (string pred action) (pcase action ('nil ; try-completion @@ -302,8 +302,7 @@ Thus, this does not include the current directory.") ('t ; all-completions (all-completions string names pred)) ('lambda ; test-completion - (let ((result (test-completion string names pred))) - (if (eq result t) string result))) + (test-completion string names pred)) ('metadata '(metadata (category . file))) (`(boundaries . ,suffix) |