branch: scratch/editorconfig-cc
commit 6f7137e59320014628133a8ae92487097a4dbf4a
Author: 10sr <8slashes+...@gmail.com>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

    Simplify definition of string-integer-p (#96)
---
 editorconfig.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/editorconfig.el b/editorconfig.el
index 73834e6bc5..bded6aa75f 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -203,9 +203,8 @@ yet.")
 
 (defun editorconfig-string-integer-p (string)
   "Return non-nil if STRING represents integer."
-  (if (stringp string)
-    (string-match-p "\\`[0-9]+\\'" string)
-    nil))
+  (and (stringp string)
+    (string-match-p "\\`[0-9]+\\'" string)))
 
 (defun editorconfig-set-indentation/python-mode (size)
   "Set `python-mode' indent size to SIZE."

Reply via email to