branch: externals/corfu
commit bb2b8d484ce3a12c069ef0f4f2e4c88f0861ae89
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    README: Update configuration
---
 README.org                  | 14 ++++++++++----
 corfu.el                    |  6 +++---
 extensions/corfu-history.el |  4 ++--
 3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/README.org b/README.org
index ea20a331cb..c745a9ff0f 100644
--- a/README.org
+++ b/README.org
@@ -127,11 +127,17 @@ Here is an example configuration:
   ;;        (shell-mode . corfu-mode)
   ;;        (eshell-mode . corfu-mode))
 
-  ;; Recommended: Enable Corfu globally.  This is recommended since Dabbrev can
-  ;; be used globally (M-/).  See also the customization variable
-  ;; `global-corfu-modes' to exclude certain modes.
   :init
-  (global-corfu-mode))
+
+  ;; Recommended: Enable Corfu globally.  Recommended since many modes provide
+  ;; Capfs and Dabbrev can be used globally (M-/).  See also the customization
+  ;; variable `global-corfu-modes' to exclude certain modes.
+  (global-corfu-mode)
+
+  ;; Enable optional extension modes:
+  ;; (corfu-history-mode)
+  ;; (corfu-popupinfo-mode)
+  )
 
 ;; A few more useful configurations...
 (use-package emacs
diff --git a/corfu.el b/corfu.el
index cdf09f77f2..b9ab640235 100644
--- a/corfu.el
+++ b/corfu.el
@@ -886,7 +886,7 @@ See `completion-in-region' for the arguments BEG, END, 
TABLE, PRED."
   (setq beg (if (markerp beg) beg (copy-marker beg))
         end (if (and (markerp end) (marker-insertion-type end)) end 
(copy-marker end t))
         completion-in-region--data (list beg end table pred 
completion-extra-properties))
-  (completion-in-region-mode 1)
+  (completion-in-region-mode)
   (activate-change-group (setq corfu--change-group (prepare-change-group)))
   (setcdr (assq #'completion-in-region-mode minor-mode-overriding-map-alist) 
corfu-map)
   (add-hook 'pre-command-hook #'corfu--prepare nil 'local)
@@ -1431,7 +1431,7 @@ local `completion-at-point-functions'."
                                   ('nil 0)
                                   ((pred symbolp) (and (derived-mode-p p) t))
                                   (`(not . ,m) (and (seq-some #'derived-mode-p 
m) 0)))))))
-    (corfu-mode 1)))
+    (corfu-mode)))
 
 (defun corfu--minibuffer-on ()
   "Enable `corfu-mode' in the minibuffer respecting `global-corfu-minibuffer'."
@@ -1439,7 +1439,7 @@ local `completion-at-point-functions'."
              (if (functionp global-corfu-minibuffer)
                  (funcall global-corfu-minibuffer)
                (local-variable-p 'completion-at-point-functions)))
-    (corfu-mode 1)))
+    (corfu-mode)))
 
 ;; Do not show Corfu commands with M-X
 (dolist (sym '( corfu-next corfu-previous corfu-first corfu-last corfu-quit 
corfu-reset
diff --git a/extensions/corfu-history.el b/extensions/corfu-history.el
index 7120ae8367..f4a9c9a140 100644
--- a/extensions/corfu-history.el
+++ b/extensions/corfu-history.el
@@ -32,8 +32,8 @@
 ;; with exponential decay.  In order to save the history across Emacs sessions,
 ;; enable `savehist-mode'.
 ;;
-;; (corfu-history-mode 1)
-;; (savehist-mode 1)
+;; (corfu-history-mode)
+;; (savehist-mode)
 
 ;;; Code:
 

Reply via email to