[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/consult d42ccdc 2/2: README: Change completion-in-regio
From: |
ELPA Syncer |
Subject: |
[elpa] externals/consult d42ccdc 2/2: README: Change completion-in-region recommendation |
Date: |
Thu, 22 Jul 2021 14:57:08 -0400 (EDT) |
branch: externals/consult
commit d42ccdca5bbc4c437819cf4d29c7b8728ed090bc
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
README: Change completion-in-region recommendation
---
README.org | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/README.org b/README.org
index b5e54bb..9f633c8 100644
--- a/README.org
+++ b/README.org
@@ -370,11 +370,13 @@ their descriptions.
UI is used.
#+begin_src emacs-lisp
;; Use `consult-completion-in-region' if Vertico is enabled.
- (add-hook 'vertico-mode-hook (lambda ()
- (setq completion-in-region-function
- (if vertico-mode
- #'consult-completion-in-region
- #'completion--in-region))))
+ ;; Otherwise use the default `completion--in-region' function.
+ (setq completion-in-region-function
+ (lambda (&rest args)
+ (apply (if vertico-mode
+ #'consult-completion-in-region
+ #'completion--in-region)
+ args)))
#+end_src
Instead of =consult-completion-in-region=, you may prefer to see the
completions directly in the buffer as a small popup. In that case, I