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

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

[nongnu] elpa/swsw f0f65362d4 095/146: * swsw.el (swsw--set-id-chars): U


From: ELPA Syncer
Subject: [nongnu] elpa/swsw f0f65362d4 095/146: * swsw.el (swsw--set-id-chars): Use 'length' instead of 'nth'
Date: Wed, 25 May 2022 02:59:50 -0400 (EDT)

branch: elpa/swsw
commit f0f65362d4d6188ca7f7a59e05351c88515c223d
Author: Daniel Semyonov <cmstr@dsemy.com>
Commit: Daniel Semyonov <cmstr@dsemy.com>

    * swsw.el (swsw--set-id-chars): Use 'length' instead of 'nth'
---
 swsw.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/swsw.el b/swsw.el
index f2af70fb80..133ad2f929 100644
--- a/swsw.el
+++ b/swsw.el
@@ -82,7 +82,7 @@
   "Set the variable ‘swsw-id-chars’.
 Check that the new list has at least two elements, set SYM’s value to
 CHARS, and call ‘swsw-update’."
-  (when (< (length chars) 2)
+  (unless (nth 1 chars)
     (user-error "‘swsw-id-chars’ should contain at least two characters"))
   (set-default sym chars)
   (when (fboundp 'swsw-update)



reply via email to

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