[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orderless 1f1e0380e2 122/204: Test for match before hig
From: |
ELPA Syncer |
Subject: |
[elpa] externals/orderless 1f1e0380e2 122/204: Test for match before highlighting it |
Date: |
Tue, 11 Jan 2022 12:58:23 -0500 (EST) |
branch: externals/orderless
commit 1f1e0380e2a8cd4fc29b8cc2e00cb01b56d86fbc
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>
Test for match before highlighting it
I wasn't checking for the matches before highlighting them assuming
that the regexps would indeed always match, but it turns out
incomplete TRAMP paths can sometimes violate that assumption.
---
orderless.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/orderless.el b/orderless.el
index 977651a83d..6fbf12a2fc 100644
--- a/orderless.el
+++ b/orderless.el
@@ -310,11 +310,10 @@ at a word boundary in the candidate. This is similar to
the
;;; Highlighting matches
(defun orderless--highlight (regexps string)
- "Propertize STRING to highlight a match of each of the REGEXPS.
-Warning: only use this if you know all REGEXPs match!"
+ "Propertize STRING to highlight a match of each of the REGEXPS."
(cl-loop with n = (length orderless-match-faces)
- for regexp in regexps and i from 0 do
- (string-match regexp string)
+ for regexp in regexps and i from 0
+ when (string-match regexp string) do
(cl-loop
for (x y) on (or (cddr (match-data)) (match-data)) by #'cddr
when x do
- [elpa] externals/orderless c51037b8ef 024/204: Add custom variable for component separator regexp, (continued)
- [elpa] externals/orderless c51037b8ef 024/204: Add custom variable for component separator regexp, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 9856eeed32 047/204: Mention prefixes style in overview, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless cacd856f9a 041/204: Leverage completion-regexp-list: simplify code, increase speed!, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 3005cf8ee9 077/204: Merge pull request #12 from noctuid/feature/strict-initialism, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless f8efbdae4d 087/204: Document style dispatches in the README, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless e16fc5ddb1 099/204: Ido has progressive completion too!, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless dc1a31b5fc 098/204: Merge remote-tracking branch 'github/master', ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 306fb267f5 100/204: Mark orderless-temporarily-change-separator obsolete (#15), ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 09f4c74280 105/204: Update dispatchers documentation, add transient vars, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless bc9e48216e 120/204: Add option for "smart case" matching, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 1f1e0380e2 122/204: Test for match before highlighting it,
ELPA Syncer <=
- [elpa] externals/orderless 6b94b9abf8 124/204: Merge pull request #21 from wyuenho/patch-1, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 0826fd4eb4 130/204: Merge pull request #27 from vifon/master, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless fc420e3d07 134/204: Minor readme tweak, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless b600f88db0 144/204: Add orderless-define-completion-style macro, a new fix for #31, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 94d52640d4 145/204: Change docstring interface for orderless-define-completion-style, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless da876320b3 146/204: Remove all orderless-transient-* variables (fix #34), ELPA Syncer, 2022/01/11
- [elpa] externals/orderless c023ee1cbe 150/204: Add option to skip-highlighting as requested by @clemera, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 1ed0c4aabb 153/204: Fix typo, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 0ebc884693 154/204: Update manual to not recommend icomplete anymore, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 9d5b95f402 157/204: Merge pull request #40 from minad/master, ELPA Syncer, 2022/01/11