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

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

[elpa] externals/typo da00074a8e 1/2: * typo.el (typo--test): Fix check


From: ELPA Syncer
Subject: [elpa] externals/typo da00074a8e 1/2: * typo.el (typo--test): Fix check for typo-shrink and typo-expand
Date: Wed, 7 Jun 2023 16:00:24 -0400 (EDT)

branch: externals/typo
commit da00074a8eb25158e759dcac2c9c0552fe5e6e2a
Author: Visuwesh <visuweshm@gmail.com>
Commit: Philip Kaludercic <philipk@posteo.net>

    * typo.el (typo--test): Fix check for typo-shrink and typo-expand
    
    (typo--test "-ener" "-n") would return t even though it has three
    deletions and should be rejected as per the default value of typo-shrink.
    
    See the discussion 
https://lists.sr.ht/~pkal/public-inbox/%3C87v8gg8z2j.fsf%40gmail.com%3E.
---
 typo.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/typo.el b/typo.el
index 3a56132d3c..40618b711f 100644
--- a/typo.el
+++ b/typo.el
@@ -77,9 +77,8 @@ frameworks)."
              ((natnump typo-level)
               typo-level)
              ((error "Invalid `typo-level' %S" typo-level)))))
-       (and (<= (- typo-shrink)
-               (- len-word len-key)
-               typo-expand)
+       (and (<= (- len-word len-key) typo-shrink)
+            (<= (- len-key len-word) typo-expand)
            (<= (string-distance ,word ,key)
                typo-level))))))
 



reply via email to

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