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

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

[elpa] externals/tomelr 98c9b8c1fc 26/84: fix: Use `=` and `length` sepa


From: ELPA Syncer
Subject: [elpa] externals/tomelr 98c9b8c1fc 26/84: fix: Use `=` and `length` separately instead of `length=`
Date: Tue, 3 May 2022 09:58:09 -0400 (EDT)

branch: externals/tomelr
commit 98c9b8c1fc9eb3fbc0016d6692ae8aed95bbe003
Author: Kaushal Modi <kaushal.modi@gmail.com>
Commit: Kaushal Modi <kaushal.modi@gmail.com>

    fix: Use `=` and `length` separately instead of `length=`
    
    length= does not exist on 27.2 and older Emacs versions.
    
    It was added in Emacs 28.1 in
    
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=9809f7ed2c639bd51abd4a28bd5d1a37f0d46a3d.
---
 tomelr.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tomelr.el b/tomelr.el
index 8952f920a9..f4ed83e757 100644
--- a/tomelr.el
+++ b/tomelr.el
@@ -277,7 +277,7 @@ non-nil.  Sorting can optionally be DESTRUCTIVE for speed."
 (defun tomelr--print-array (array)
   "Like `tomelr-encode-array', but insert the TOML at point."
   (insert "[ ")
-  (unless (length= array 0)
+  (unless (= 0 (length array))
     (tomelr--with-indentation
       (let ((first t))
         (mapc (lambda (elt)
@@ -285,8 +285,9 @@ non-nil.  Sorting can optionally be DESTRUCTIVE for speed."
                     (setq first nil)
                   (insert ", "))
                 (tomelr--print elt))
-              array))))
-  (insert " ]"))
+              array)))
+    (insert " "))
+  (insert "]"))
 
 (defun tomelr-encode-array (array)
   "Return a TOML representation of ARRAY.



reply via email to

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