[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu e0b7936c21 1/2: README: Use keymap-set
From: |
ELPA Syncer |
Subject: |
[elpa] externals/corfu e0b7936c21 1/2: README: Use keymap-set |
Date: |
Sun, 18 Aug 2024 06:57:52 -0400 (EDT) |
branch: externals/corfu
commit e0b7936c21121158628bc2b392fc7a42e26ae536
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
README: Use keymap-set
---
README.org | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/README.org b/README.org
index d0e05f3435..dd93cb27ca 100644
--- a/README.org
+++ b/README.org
@@ -406,17 +406,17 @@ modes using a menu-item filter.
(corfu-auto t) ;; Enable auto completion
(corfu-preselect 'directory) ;; Select the first candidate, except for
directories
+ :init
+
;; Free the RET key for less intrusive behavior.
- :bind
- (:map corfu-map
- ;; Option 1: Unbind RET completely
- ;;; ("RET" . nil)
- ;; Option 2: Use RET only in shell modes
- :filter
- (or (derived-mode-p 'eshell-mode) (derived-mode-p 'comint-mode))
- ("RET" . corfu-send))
+ ;; Option 1: Unbind RET completely
+ ;; (keymap-unset corfu-map "RET")
+ ;; Option 2: Use RET only in shell modes
+ (keymap-set corfu-map "RET" `( menu-item "" nil :filter
+ ,(lambda (&optional _)
+ (and (derived-mode-p 'eshell-mode
'comint-mode)
+ #'corfu-send))))
- :init
(global-corfu-mode))
#+end_src