summaryrefslogtreecommitdiff
path: root/README.org
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2022-12-13 14:54:36 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2022-12-13 14:54:36 +0100
commit9077c1e6fdade78a1eb7432ea6dae580e8bb6762 (patch)
tree3b2dc4ad7340ebe887758e6c952fef12ac0e6774 /README.org
parent6f74b675521ca9731eec120da01dd9e6d56af449 (diff)
README: Improve example, check password map (Fix #276)
Diffstat (limited to 'README.org')
-rw-r--r--README.org8
1 files changed, 5 insertions, 3 deletions
diff --git a/README.org b/README.org
index c8ea004..dfa7542 100644
--- a/README.org
+++ b/README.org
@@ -241,14 +241,16 @@ effect.
#+end_src
You can also enable Corfu more generally for every minibuffer, as long as no
-other completion UI is active. If you use Mct or Vertico as your main minibuffer
-completion UI, the following snippet should yield the desired result.
+completion UI is active. In the following example we check for Mct and Vertico.
+Furthermore we ensure that Corfu is not enabled if a password is read from the
+minibuffer.
#+begin_src emacs-lisp
(defun corfu-enable-always-in-minibuffer ()
"Enable Corfu in the minibuffer if Vertico/Mct are not active."
(unless (or (bound-and-true-p mct--active)
- (bound-and-true-p vertico--input))
+ (bound-and-true-p vertico--input)
+ (eq (current-local-map) read-passwd-map))
;; (setq-local corfu-auto nil) ;; Enable/disable auto completion
(setq-local corfu-echo-delay nil ;; Disable automatic echo and popup
corfu-popupinfo-delay nil)