diff options
Diffstat (limited to 'orderless.el')
| -rw-r--r-- | orderless.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/orderless.el b/orderless.el index b77a0dc..de21508 100644 --- a/orderless.el +++ b/orderless.el @@ -146,11 +146,12 @@ If there are no matches, it returns nil. In any other case it (let* ((limit (car (completion-boundaries string table pred ""))) (prefix (substring string 0 limit)) (all (orderless-all-completions string table pred point))) - (cl-flet ((measured (string) (cons string (length string)))) - (cond - ((null all) nil) - ((atom (cdr all)) (measured (concat prefix (car all)))) - (t (measured string)))))) + (cond + ((null all) nil) + ((atom (cdr all)) + (let ((full (concat prefix (car all)))) + (cons full (length full)))) + (t (cons string point))))) (cl-pushnew '(orderless orderless-try-completion orderless-all-completions |
