From cf19fe739c78184a61f11f834e9306ff06fa431c Mon Sep 17 00:00:00 2001 From: Ralf Beckmann Date: Sat, 14 Mar 2020 20:52:33 +0100 Subject: [PATCH] Apply some minor changes to the helm module Remove usage of the following variables, since they are no longer present in helm's source code: helm-M-x-fuzzy-match helm-completion-in-region-fuzzy-match Also remove the usage of the deprecated helm-mode-fuzzy-match variable. Instead, modify completing-styles so that helmized commands will use multi- or fuzzy-matching, respectively. --- modules/completion/helm/config.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/completion/helm/config.el b/modules/completion/helm/config.el index 5f1666850..b4906b2c8 100644 --- a/modules/completion/helm/config.el +++ b/modules/completion/helm/config.el @@ -77,23 +77,25 @@ be negative.") (setq helm-display-function #'+helm-posframe-display-fn)) (let ((fuzzy (featurep! +fuzzy))) - (setq helm-M-x-fuzzy-match fuzzy - helm-apropos-fuzzy-match fuzzy - helm-apropos-fuzzy-match fuzzy + (setq helm-apropos-fuzzy-match fuzzy helm-bookmark-show-location fuzzy helm-buffers-fuzzy-matching fuzzy - helm-completion-in-region-fuzzy-match fuzzy - helm-completion-in-region-fuzzy-match fuzzy helm-ff-fuzzy-matching fuzzy helm-file-cache-fuzzy-match fuzzy helm-flx-for-helm-locate fuzzy helm-imenu-fuzzy-match fuzzy helm-lisp-fuzzy-completion fuzzy helm-locate-fuzzy-match fuzzy - helm-mode-fuzzy-match fuzzy helm-projectile-fuzzy-match fuzzy helm-recentf-fuzzy-match fuzzy - helm-semantic-fuzzy-match fuzzy)) + helm-semantic-fuzzy-match fuzzy) + ;; Make sure that we have helm-multi-matching or fuzzy matching, + ;; (as prescribed by the fuzzy flag) also in the following cases: + ;; - helmized commands that use `completion-at-point' and similar functions + ;; - native commands that fall back to `completion-styles' like `helm-M-x' + (if (< emacs-major-version 27) + (push (if fuzzy 'helm-flex 'helm) completion-styles) + (push (if fuzzy 'flex 'helm) completion-styles))) :config (set-popup-rule! "^\\*helm" :vslot -100 :size 0.22 :ttl nil) @@ -121,7 +123,6 @@ be negative.") (dolist (fn '(helm-describe-variable helm-describe-function)) (advice-add fn :around #'doom-use-helpful-a))) - (use-package! helm-flx :when (featurep! +fuzzy) :hook (helm-mode . helm-flx-mode)