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

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

[elpa] externals/vertico 2e8d913 2/2: README: Change completion-in-regio


From: ELPA Syncer
Subject: [elpa] externals/vertico 2e8d913 2/2: README: Change completion-in-region function recommendation
Date: Thu, 22 Jul 2021 14:57:21 -0400 (EDT)

branch: externals/vertico
commit 2e8d913d85c0ae15ef17a1a2a3608cd15153c0cb
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    README: Change completion-in-region function recommendation
---
 README.org | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/README.org b/README.org
index 63c2ed2..080959f 100644
--- a/README.org
+++ b/README.org
@@ -240,11 +240,13 @@
 
   #+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
 
   Furthermore Consult offers an enhanced =completing-read-multiple= 
implementation,



reply via email to

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