[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/jinx e6ff14d313 1/2: Add jinx-menu-suggestions defcusto
From: |
ELPA Syncer |
Subject: |
[elpa] externals/jinx e6ff14d313 1/2: Add jinx-menu-suggestions defcustom |
Date: |
Thu, 14 Dec 2023 15:58:11 -0500 (EST) |
branch: externals/jinx
commit e6ff14d313e19f3b492d907fa9627ce1959a0e91
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Add jinx-menu-suggestions defcustom
---
jinx.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/jinx.el b/jinx.el
index 5ef65a86fc..5fed32fc3f 100644
--- a/jinx.el
+++ b/jinx.el
@@ -165,6 +165,10 @@ checking."
"Maximal edit distance for session words to be included in suggestions."
:type 'natnum)
+(defcustom jinx-menu-suggestions 10
+ "Maximal number of suggestions shown in the context menu."
+ :type 'natnum)
+
(defvar-local jinx-local-words ""
"File-local words, as a string separated by whitespace.")
@@ -990,11 +994,11 @@ This command dispatches to the following commands:
(when-let ((desc (jinx--mod-describe dict))
(suggestions (jinx--mod-suggest dict word)))
(push `[,(concat (car desc) " - " (cdr desc)) :active nil] menu)
- (cl-loop for w in suggestions repeat 10 do
+ (cl-loop for w in suggestions repeat jinx-menu-suggestions do
(push `[,w (jinx--correct-replace ,ov ,w)] menu))))
(when-let ((suggestions (jinx--session-suggestions word)))
(push ["Session" :active nil] menu)
- (cl-loop for w in suggestions repeat 10 do
+ (cl-loop for w in suggestions repeat jinx-menu-suggestions do
(push `[,w (jinx--correct-replace ,ov ,w)] menu)))
(push ["Accept and save" :active nil] menu)
(cl-loop for (key . fun) in jinx--save-keys