branch: elpa/helm
commit 9ed0f213cb0c1086ddb646accaeb609a6ae1999b
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@posteo.net>

    Fix helm-string-numberp
    
    For a file extension like "3gp" it was previously returning t, it is
    now returning nil.
---
 helm-lib.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/helm-lib.el b/helm-lib.el
index cd467f5d24..14724617b3 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -1436,8 +1436,8 @@ in LIST to be displayed in PROMPT."
 (defsubst helm-string-numberp (str)
   "Return non nil if string STR represent a number."
   (cl-assert (stringp str) t)
-  (or (cl-loop for c across str always (char-equal c ?0))
-      (not (zerop (string-to-number str)))))
+  (cl-loop with chars = '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9)
+           for c across str always (memql c chars)))
 
 (defsubst helm-re-search-forward (regexp &optional bound noerror count)
   "Same as `re-search-forward' but return nil when point doesn't move.

Reply via email to