[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/flx 482b887215 046/182: (BREAKING) activate through proper
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/flx 482b887215 046/182: (BREAKING) activate through proper minor-mode |
Date: |
Tue, 13 Dec 2022 03:59:25 -0500 (EST) |
branch: elpa/flx
commit 482b8872159323f3f74fcca104cafd98719b26bd
Author: Le Wang <le.wang@agworld.com.au>
Commit: Le Wang <le.wang@agworld.com.au>
(BREAKING) activate through proper minor-mode
- also decouple from ido-enable-flex-matching
---
README.md | 5 +++--
flx-ido.el | 25 +++++++++++++++----------
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
index f1b3e5bc26..0e0f14efc1 100644
--- a/README.md
+++ b/README.md
@@ -67,8 +67,9 @@ to your init file.
Add this to your init file and *flx* match will be enabled for ido.
(require 'flx-ido)
- (setq ido-enable-flex-matching t
- flx-ido-use t)
+ (ido-mode 1)
+ (ido-everywhere 1)
+ (flx-ido-mode 1)
diff --git a/flx-ido.el b/flx-ido.el
index 7d41aec95e..3fb663420c 100644
--- a/flx-ido.el
+++ b/flx-ido.el
@@ -13,7 +13,7 @@
;; Version: 0.1
;; Last-Updated:
;; By:
-;; Update #: 44
+;; Update #: 49
;; URL:
;; Keywords:
;; Compatibility:
@@ -23,8 +23,9 @@
;; Add to your init file:
;;
;; (require 'flx-ido)
-;; (setq ido-enable-flex-matching t
-;; flx-ido-use t)
+;; (ido-mode 1)
+;; (ido-everywhere 1)
+;; (flx-ido-mode 1)
;;
;;
@@ -160,16 +161,13 @@ item, in which case, the ending items are deleted."
res-items
(flx-ido-match-internal query res-items)))))
-(defvar flx-ido-use t
- "Use flx matching for ido.")
-
(defadvice ido-exit-minibuffer (around flx-ido-undecorate activate)
"Remove flx properties after."
(let* ((obj (car ido-matches))
(str (if (consp obj)
(car obj)
obj)))
- (when (and flx-ido-use str)
+ (when (and flx-ido-mode str)
(remove-text-properties 0 (length str)
'(face flx-highlight-face) str)))
@@ -179,17 +177,24 @@ item, in which case, the ending items are deleted."
"Clear flx narrowed hash beforehand.
Remove flx properties after."
- (when flx-ido-use
+ (when flx-ido-mode
(clrhash flx-ido-narrowed-matches-hash))
ad-do-it)
(defadvice ido-set-matches-1 (around flx-ido-set-matches-1 activate)
"Choose between the regular ido-set-matches-1 and my-ido-fuzzy-match"
- (if (and flx-ido-use
- ido-enable-flex-matching)
+ (if flx-ido-mode
(setq ad-return-value (flx-ido-match ido-text (ad-get-arg 0)))
ad-do-it))
+;;;###autoload
+(define-minor-mode flx-ido-mode
+ "Toggle flx ido mode"
+ :init-value nil
+ :lighter ""
+ :group 'ido
+ :global t)
+
(provide 'flx-ido)
- [nongnu] elpa/flx 4cf3f5ad45 059/182: Merge pull request #25 from bbatsov/improve-headers, (continued)
- [nongnu] elpa/flx 4cf3f5ad45 059/182: Merge pull request #25 from bbatsov/improve-headers, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 11422574e5 166/182: Merge pull request #106 from jcs-PR/badge, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 647cb2f92f 168/182: Merge pull request #104 from phst/nocl, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx ae0981b253 156/182: Merge pull request #87 from spwhitton/apt-get, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 29e3664b75 175/182: Bump version to 0.6.2, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx ed11b39577 178/182: No longer bind obsolete max-specpdl-size, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 67379d0a01 036/182: 2nd try fix for `ido-merge-work-directories`, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 01818a56ae 039/182: handle of cons cells in completion list, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 3d15906942 019/182: move demo into misc, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx f1851c8983 037/182: treat last *non-zero* segment as basename, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 482b887215 046/182: (BREAKING) activate through proper minor-mode,
ELPA Syncer <=
- [nongnu] elpa/flx 451711cfeb 058/182: Improve comment headers, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx bebf045684 062/182: gracefully handle large collections, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 490412dcc9 061/182: Rename predicate functions according to Emacs Lisp style, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 1c42be202d 071/182: Merge pull request #29 from bbatsov/marmalade, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 638313b829 077/182: .gitignore: ignore emacs temporary files, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 24dd436463 100/182: Fix compilation errors., ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx b322b72d7b 131/182: async comes from melpa, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 551b095274 130/182: fix travis cask path, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 26a1225431 137/182: rename optimization test, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 7a2601481c 142/182: Simplify flx-propertize, ELPA Syncer, 2022/12/13