branch: externals/greader
commit c5fb6b4194d3142770cc266d4268cc04857221cf
Author: Michelangelo Rodriguez <[email protected]>
Commit: Michelangelo Rodriguez <[email protected]>

    Fixed functions `greader-dict-add-entry' and `greader-dict--get-matches' to 
handle correctly things which have properties.
---
 greader-dict.el | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/greader-dict.el b/greader-dict.el
index bc3f8f1126..d4f473286b 100644
--- a/greader-dict.el
+++ b/greader-dict.el
@@ -619,12 +619,15 @@ the current sentence."
 modify: "
                                   nil
                                   nil
-                                  (append (list default-word)(when
-                                                                 
greader-dict-include-sentences-in-defaults
-                                                               
(greader-dict--get-word-alternatives
-                                                                
(greader-get-sentence)))
-                                          (greader-dict--get-matches
-                                           'word))))
+                                  (append (list
+                                           (substring-no-properties
+                                            default-word))
+                                          (when
+                                           
greader-dict-include-sentences-in-defaults
+                                           (greader-dict--get-word-alternatives
+                                            (greader-get-sentence)))
+                                            (greader-dict--get-matches
+                                             'word))))
            (setq value (read-string (concat "substitute word " key
                                             " with: ")
                                     (gethash key greader-dictionary)))
@@ -881,7 +884,9 @@ classified as words."
   (if-let ((alternatives text))
       (progn
        (setq alternatives nil)
-       (dolist (word (split-string (substring-no-properties text) "\\W" t))
+       (dolist
+           (word
+            (split-string (substring-no-properties text) "\\W" t))
          (unless (member word alternatives)
            (push word alternatives)))
        (reverse alternatives))

Reply via email to