emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/orderless 7f79dc2233 038/204: Don't move point unless a


From: ELPA Syncer
Subject: [elpa] externals/orderless 7f79dc2233 038/204: Don't move point unless actually completing
Date: Tue, 11 Jan 2022 12:58:15 -0500 (EST)

branch: externals/orderless
commit 7f79dc2233947fafb710ae98bc3fa3971f1d9295
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>

    Don't move point unless actually completing
---
 orderless.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/orderless.el b/orderless.el
index b77a0dce40..de21508f65 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]