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

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

[nongnu] elpa/helm 8aca822d18 1/5: Use a :diacritics slot both in in-buf


From: ELPA Syncer
Subject: [nongnu] elpa/helm 8aca822d18 1/5: Use a :diacritics slot both in in-buffer and sync sources
Date: Fri, 13 May 2022 04:58:27 -0400 (EDT)

branch: elpa/helm
commit 8aca822d1864c7c03dda01f0f0ac3c6e96e47091
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Use a :diacritics slot both in in-buffer and sync sources
    
    for consistency.
    Thus having an unbound symbol in :match slot create problems when
    using both fuzzy and diacritics confusing the helm--setup-source method.
---
 helm-source.el | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/helm-source.el b/helm-source.el
index cbface93d0..e56b1efcd9 100644
--- a/helm-source.el
+++ b/helm-source.el
@@ -470,15 +470,19 @@
   in the list of results and then results from the other
   functions, respectively.
 
-  If the special symbol `diacritics' is given as value helm will ignore
-  diacritics when matching candidates.
- 
   This attribute has no effect for asynchronous sources (see
   attribute `candidates'), and sources using `match-dynamic'
   since they perform pattern matching themselves.
 
   Note that FUZZY-MATCH slot will overhide value of this slot.")
 
+   (diacritics
+    :initarg :diacritics
+    :initform nil
+    :custom boolean
+    :documentation
+    "  Ignore diacritics when searching.")
+
    (match-on-real
     :initarg :match-on-real
     :initform nil
@@ -822,14 +826,7 @@ inherit from `helm-source'.")
 
    (match
     :initform '(identity))
-
-   (diacritics
-    :initarg :diacritics
-    :initform nil
-    :custom boolean
-    :documentation
-    "  Ignore diacritics when searching.")
-
+   
    (get-line
     :initarg :get-line
     :initform 'buffer-substring-no-properties
@@ -988,11 +985,9 @@ Arguments ARGS are keyword value pairs as defined in 
CLASS."
   "Prepare match or search functions for class SOURCE.
 Argument METHOD is the matching method used by SOURCE either `match'
 or `search'."
-  (let* ((diacritics (cl-case method
-                       (match  (eq (slot-value source 'match) 'diacritics))
-                       (search (slot-value source 'diacritics))))
+  (let* ((diacritics       (slot-value source 'diacritics))
          (defmatch         (helm-aif (slot-value source 'match)
-                               (unless diacritics (helm-mklist it))))
+                               (helm-mklist it)))
          (defmatch-strict  (helm-aif (and (eq method 'match)
                                           (slot-value source 'match-strict))
                                (helm-mklist it)))



reply via email to

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