emacs-diffs
[Top][All Lists]
Advanced

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

scratch/emacs-editorconfig d900f27638d 113/364: Simplify definition of s


From: Stefan Monnier
Subject: scratch/emacs-editorconfig d900f27638d 113/364: Simplify definition of string-integer-p (#96)
Date: Tue, 18 Jun 2024 01:40:44 -0400 (EDT)

branch: scratch/emacs-editorconfig
commit d900f27638d5d4340d38a575fc93b9e2f8455fc6
Author: 10sr <8slashes+git@gmail.com>
Commit: Stefan Monnier <monnier@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 d6da83ba8de..f1ffb8cf179 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -146,9 +146,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

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