[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 48756d5b38: Fix errors with negation in completion-at
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 48756d5b38: Fix errors with negation in completion-at-point |
Date: |
Sat, 9 Sep 2023 15:59:36 -0400 (EDT) |
branch: elpa/helm
commit 48756d5b383fd1dd1a1c6010319d5ab0d9fb66cf
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Fix errors with negation in completion-at-point
---
helm-utils.el | 33 ++++++++++++++++++---------------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/helm-utils.el b/helm-utils.el
index 639d9e0d0c..c0272d3291 100644
--- a/helm-utils.el
+++ b/helm-utils.el
@@ -635,21 +635,24 @@ that is sorting is done against real value of candidate."
(str1 (if (consp s1) (cdr s1) s1))
(str2 (if (consp s2) (cdr s2) s2))
(score (lambda (str r1 r2 r3 lst)
- (+ (if (string-match (concat "\\`" qpattern) str) 1 0)
- (cond ((string-match r1 str) 5)
- ((and (string-match " " qpattern)
- (string-match
- (concat "\\_<" (regexp-quote (car lst)))
str)
- (cl-loop for r in (cdr lst)
- always (string-match r str)))
- 4)
- ((and (string-match " " qpattern)
- (cl-loop for r in lst
- always (string-match r str)))
- 3)
- ((string-match r2 str) 2)
- ((string-match r3 str) 1)
- (t 0)))))
+ (condition-case nil
+ (+ (if (string-match (concat "\\`" qpattern) str) 1 0)
+ (cond ((string-match r1 str) 5)
+ ((and (string-match " " qpattern)
+ (car lst)
+ (string-match
+ (concat "\\_<" (regexp-quote (car lst)))
str)
+ (cl-loop for r in (cdr lst)
+ always (string-match r str)))
+ 4)
+ ((and (string-match " " qpattern)
+ (cl-loop for r in lst
+ always (string-match r str)))
+ 3)
+ ((string-match r2 str) 2)
+ ((string-match r3 str) 1)
+ (t 0)))
+ (invalid-regexp 0))))
(sc1 (get-text-property 0 'completion-score str1))
(sc2 (get-text-property 0 'completion-score str2))
(sc3 (if sc1 0 (funcall score str1 reg1 reg2 reg3 split)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/helm 48756d5b38: Fix errors with negation in completion-at-point,
ELPA Syncer <=