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

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

[nongnu] elpa/yaml-mode fbf8a95b0d 1/4: Make code less imperative


From: ELPA Syncer
Subject: [nongnu] elpa/yaml-mode fbf8a95b0d 1/4: Make code less imperative
Date: Sun, 23 Oct 2022 03:59:27 -0400 (EDT)

branch: elpa/yaml-mode
commit fbf8a95b0d7a5a0568e7552631d23b2f5bb144d7
Author: Vasilij Schneidermann <mail@vasilij.de>
Commit: Vasilij Schneidermann <mail@vasilij.de>

    Make code less imperative
---
 test/yaml-mode-test.el | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/test/yaml-mode-test.el b/test/yaml-mode-test.el
index de66e8a686..c1ec838cac 100644
--- a/test/yaml-mode-test.el
+++ b/test/yaml-mode-test.el
@@ -59,16 +59,15 @@
 
 (defun yaml-test-range-has-property (begin end prop value)
   "Verify that range BEGIN to END has PROP equal to or containing VALUE."
-  (let (vals fail-loc)
-    (setq fail-loc
-          (catch 'fail
-            (dolist (loc (number-sequence begin end))
-              (setq vals (get-char-property loc prop))
-              (if (and vals (listp vals))
-                  (unless (memq value vals)
-                    (throw 'fail loc))
-                (unless (eq vals value)
-                  (throw 'fail loc))))))
+  (let ((fail-loc
+         (catch 'fail
+           (dolist (loc (number-sequence begin end))
+             (let ((vals (get-char-property loc prop)))
+               (if (and vals (listp vals))
+                   (unless (memq value vals)
+                     (throw 'fail loc))
+                 (unless (eq vals value)
+                   (throw 'fail loc))))))))
     (when fail-loc
       (message "Testing range (%d,%d) for property %s equal to %s."
                begin end prop value)



reply via email to

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