summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2022-03-12 09:50:26 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2022-03-12 09:59:43 +0100
commit41281fd92dbf6ab6dcf75f61312d8a486a7b4ca9 (patch)
treedddd057901eef617e07d387b26863740cf56f373
parent7ddf5dfe9e982ee1510ceec36eeb4d8bb802ea73 (diff)
Ivy: Do not auto register the highlighting function
It seems to me that there is almost no advantage of auto loading that part of the code in contrast to adding it to the configuration directly. Probably most users use Orderless with completion systems like default completion, Vertico or Mct.
-rw-r--r--README.org1
-rw-r--r--orderless.el6
-rw-r--r--orderless.texi1
3 files changed, 2 insertions, 6 deletions
diff --git a/README.org b/README.org
index 71e3416..a508bef 100644
--- a/README.org
+++ b/README.org
@@ -330,6 +330,7 @@ To use =orderless= from Ivy add this to your Ivy configuration:
#+begin_src emacs-lisp
(setq ivy-re-builders-alist '((t . orderless-ivy-re-builder)))
+ (add-to-list 'ivy-highlight-functions-alist '(orderless-ivy-re-builder . orderless-ivy-highlight))
#+end_src
** Selectrum
diff --git a/orderless.el b/orderless.el
index 6352697..347392f 100644
--- a/orderless.el
+++ b/orderless.el
@@ -504,11 +504,5 @@ a value in `ivy-re-builders-alist'."
This function is for integration of orderless with ivy."
(orderless--highlight (mapcar #'car ivy-regex) str) str)
-;;;###autoload
-(with-eval-after-load 'ivy
- (defvar ivy-highlight-functions-alist)
- (add-to-list 'ivy-highlight-functions-alist
- '(orderless-ivy-re-builder . orderless-ivy-highlight)))
-
(provide 'orderless)
;;; orderless.el ends here
diff --git a/orderless.texi b/orderless.texi
index 9bafc7f..92d6d57 100644
--- a/orderless.texi
+++ b/orderless.texi
@@ -393,6 +393,7 @@ To use @samp{orderless} from Ivy add this to your Ivy configuration:
@lisp
(setq ivy-re-builders-alist '((t . orderless-ivy-re-builder)))
+(add-to-list 'ivy-highlight-functions-alist '(orderless-ivy-re-builder . orderless-ivy-highlight))
@end lisp
@node Selectrum