[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm a315920e11 3/6: Fix helm-mm-regexp-p and helm-mm-diac
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm a315920e11 3/6: Fix helm-mm-regexp-p and helm-mm-diacritics-string-match for searching match-parts |
Date: |
Thu, 12 May 2022 04:58:30 -0400 (EDT) |
branch: elpa/helm
commit a315920e110476c3a3e272724b1c865bd0ffdf4d
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Fix helm-mm-regexp-p and helm-mm-diacritics-string-match for searching
match-parts
---
helm-multi-match.el | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/helm-multi-match.el b/helm-multi-match.el
index 559c3feb9c..e03113c347 100644
--- a/helm-multi-match.el
+++ b/helm-multi-match.el
@@ -207,7 +207,7 @@ E.g., ((identity . \"foo\") (not . \"bar\"))."
(cons 'identity pat)))))
(defun helm-mm-regexp-p (string)
- (string-match-p "[[]*+^$.?\\]" string))
+ (string-match-p "[][*+^$.?]" string))
(defvar helm-mm--match-on-diacritics nil)
@@ -322,7 +322,17 @@ i.e. the sources which have the slot :migemo with non--nil
value."
(string-match (assoc-default pattern helm-mm--previous-migemo-info) str))
(defun helm-mm-diacritics-string-match (pattern str)
- (string-match (char-fold-to-regexp pattern) str))
+ "Check if PATTERN match STR ignoring diacritics.
+
+If PATTERN is a regexp (i.e. `helm-mm-regexp-p') use PATTERN
+unmodified, otherwise transform PATTERN with `char-fold-to-regexp'.
+
+This function is used to search match-part of candidate in in-buffer
+sources."
+ (string-match (if (helm-mm-regexp-p pattern)
+ pattern
+ (char-fold-to-regexp pattern))
+ str))
(cl-defun helm-mm-3-migemo-match (candidate &optional (pattern helm-pattern))
(and helm-migemo-mode
- [nongnu] elpa/helm updated (ec76b7d0ff -> 737ce8e263), ELPA Syncer, 2022/05/12
- [nongnu] elpa/helm 4f0066ac3b 2/6: Implement diacritics for in buffer sources, ELPA Syncer, 2022/05/12
- [nongnu] elpa/helm 80a37c6d5e 5/6: Add a variable to controls diacritics usage in helm-occur, ELPA Syncer, 2022/05/12
- [nongnu] elpa/helm 737ce8e263 6/6: Update helm-source docstring, ELPA Syncer, 2022/05/12
- [nongnu] elpa/helm b7b21b5733 4/6: Add docstring to helm-source-mm-get-search-or-match-fns, ELPA Syncer, 2022/05/12
- [nongnu] elpa/helm a315920e11 3/6: Fix helm-mm-regexp-p and helm-mm-diacritics-string-match for searching match-parts,
ELPA Syncer <=
- [nongnu] elpa/helm 187e358493 1/6: Ensure to not collect nil candidates in helm-occur-transformer, ELPA Syncer, 2022/05/12