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

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

[elpa] externals/minuet e27348ea90 30/97: doc: Use `:bind` instead of ge


From: ELPA Syncer
Subject: [elpa] externals/minuet e27348ea90 30/97: doc: Use `:bind` instead of general-define-key for wider accessibility (#7)
Date: Mon, 24 Mar 2025 18:59:13 -0400 (EDT)

branch: externals/minuet
commit e27348ea903dbbf6051449ee1996767de5a3195f
Merge: 001e9fe417 4ed8a466d5
Author: milanglacier <dev@milanglacier.com>
Commit: GitHub <noreply@github.com>

    doc: Use `:bind` instead of general-define-key for wider accessibility (#7)
---
 README.md | 29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)

diff --git a/README.md b/README.md
index a5a498d87e..8332798902 100644
--- a/README.md
+++ b/README.md
@@ -66,16 +66,19 @@ Currently you need to install from github via `package-vc` 
or
 (straight-use-package '(minuet :host github :repo "milanglacier/minuet-ai.el"))
 
 (use-package minuet
-    :init
-    (general-define-key
-     ;; use completion-in-region for completion
-     "M-y" #'minuet-completion-in-region
-     ;; use overlay for completion
-     "M-i" #'minuet-show-suggestion)
+    :bind (("M-y" . #'minuet-completion-in-region) ;; use completion-in-region 
for completion
+           ("M-i" . #'minuet-show-suggestion) ;; use overlay for completion
+           :map minuet-active-mode-map
+           ("M-p" . #'minuet-previous-suggestion) ;; invoke completion or 
cycle to next completion
+           ("M-n" . #'minuet-next-suggestion) ;; invoke completion or cycle to 
previous completion
+           ("M-A" . #'minuet-accept-suggestion) ;; accept whole completion
+           ("M-a" . #'minuet-accept-suggestion-line) ;; accept current line 
completion
+           ("M-e" . #'minuet-dismiss-suggestion))
 
-     ;; if you want to enable auto suggestion.
-     ;; Note that you can manually invoke completions without enable 
minuet-auto-suggestion-mode
-     (add-hook 'prog-mode-hook #'minuet-auto-suggestion-mode)
+    :init
+    ;; if you want to enable auto suggestion.
+    ;; Note that you can manually invoke completions without enable 
minuet-auto-suggestion-mode
+    (add-hook 'prog-mode-hook #'minuet-auto-suggestion-mode)
 
     :config
     (setq minuet-provider 'openai-fim-compatible)
@@ -84,14 +87,6 @@ Currently you need to install from github via `package-vc` or
     ;; Not required when defining minuet-active-mode-map without evil state.
     (add-hook 'minuet-active-mode-hook #'evil-normalize-keymaps)
 
-    (general-define-key
-     :keymaps 'minuet-active-mode-map
-     "M-p" #'minuet-previous-suggestion ;; invoke completion or cycle to next 
completion
-     "M-n" #'minuet-next-suggestion ;; invoke completion or cycle to previous 
completion
-     "M-A" #'minuet-accept-suggestion ;; accept whole completion
-     "M-a" #'minuet-accept-suggestion-line ;; accept current line completion
-     "M-e" #'minuet-dismiss-suggestion)
-
     (minuet-set-optional-options minuet-openai-fim-compatible-options 
:max_tokens 256))
 ```
 



reply via email to

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