branch: externals/jinx
commit 42e6d7f1f3b12dc95f203753926d252c98f8bbc8
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    Offer lower-case words for saving in personal dictionary
---
 jinx.el | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/jinx.el b/jinx.el
index 75b00bdd60..44403156ea 100644
--- a/jinx.el
+++ b/jinx.el
@@ -745,18 +745,22 @@ The word will be associated with GROUP and get a prefix 
key."
           (setq list (jinx--add-suggestion list ht w group)))))
     (dolist (w (jinx--session-suggestions word))
       (setq list (jinx--add-suggestion list ht w "Suggestions from session")))
-    (cl-loop for (key . fun) in jinx--save-keys
-             for actions = (funcall fun nil key word) do
-             (when (and actions (not (consp (car actions))))
-               (setq actions (list actions)))
-             (cl-loop for (k w a) in actions do
-                      (push (propertize
-                             (concat (propertize (if (stringp k) k 
(char-to-string k))
-                                                 'face 'jinx-save 
'rear-nonsticky t)
-                                     w)
-                             'jinx--group "Accept and save"
-                             'jinx--suffix (format #(" [%s]" 0 5 (face 
jinx-annotation)) a))
-                            list)))
+    (cl-loop
+     for (key . fun) in jinx--save-keys
+     for actions = (funcall fun nil key word) do
+     (when (and actions (not (consp (car actions))))
+       (setq actions (list actions)))
+     (cl-loop
+      for (k w a) in actions
+      for k2 = (propertize (if (stringp k) k (char-to-string k))
+                           'face 'jinx-save 'rear-nonsticky t)
+      for a2 = (format #(" [%s]" 0 5 (face jinx-annotation)) a)
+      do (cl-loop
+          for w2 in (delete-consecutive-dups (list w (downcase w))) do
+          (push (propertize (concat k2 w2)
+                            'jinx--group "Accept and save"
+                            'jinx--suffix a2)
+                list))))
     (nreverse list)))
 
 (defun jinx--correct-affixation (cands)

Reply via email to