branch: externals/orderless
commit 75d3398056b43fe75102ec15563e773128cb14d8
Author: Omar Antolín <[email protected]>
Commit: Omar Antolín <[email protected]>

    Have orderless-try-completion return t for exact match (fix #95)
---
 orderless.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/orderless.el b/orderless.el
index 33d78fe4a8..a458f329d5 100644
--- a/orderless.el
+++ b/orderless.el
@@ -462,10 +462,12 @@ This function is part of the `orderless' completion 
style."
     (cond
      ((null all) nil)
      ((null (cdr all))
-      (let ((full (concat
-                   (car (orderless--prefix+pattern string table pred))
-                   (car all))))
-        (cons full (length full))))
+      (if (equal string (car all))
+          t                             ; unique exact match
+        (let ((full (concat
+                     (car (orderless--prefix+pattern string table pred))
+                     (car all))))
+          (cons full (length full)))))
      (t (cons string point)))))
 
 ;;;###autoload

Reply via email to