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

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

[nongnu] elpa/flx 20e3fe8595 141/182: Make flx word separators customiza


From: ELPA Syncer
Subject: [nongnu] elpa/flx 20e3fe8595 141/182: Make flx word separators customizable
Date: Tue, 13 Dec 2022 03:59:38 -0500 (EST)

branch: elpa/flx
commit 20e3fe8595d263d8c91993c3e3e4692e73d68e09
Author: PythonNut <PythonNut@users.noreply.github.com>
Commit: PythonNut <PythonNut@users.noreply.github.com>

    Make flx word separators customizable
---
 flx.el | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/flx.el b/flx.el
index ba7b8e8dfe..86d4b64ec3 100644
--- a/flx.el
+++ b/flx.el
@@ -52,6 +52,16 @@
 
 (require 'cl-lib)
 
+(defgroup flx nil
+  "Fuzzy matching with good sorting"
+  :group 'convenience
+  :prefix "flx-")
+
+(defcustom flx-word-separators '(?\  ?- ?_ ?: ?. ?/ ?\\)
+  "List of characters that act as word separators in flx"
+  :type '(repeat character)
+  :group 'flx)
+
 (defface flx-highlight-face  '((t (:inherit font-lock-variable-name-face :bold 
t :underline t)))
   "Face used by flx for highlighting flx match characters."
   :group 'flx)
@@ -60,7 +70,7 @@
 (defsubst flx-word-p (char)
   "Check if CHAR is a word character."
   (and char
-       (not (memq char '(?\  ?- ?_ ?: ?. ?/ ?\\)))))
+       (not (memq char flx-word-separators))))
 
 (defsubst flx-capital-p (char)
   "Check if CHAR is an uppercase character."



reply via email to

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