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

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

[nongnu] elpa/spell-fu 3898e6f591 04/86: Cleanup: remove use of exceptio


From: ELPA Syncer
Subject: [nongnu] elpa/spell-fu 3898e6f591 04/86: Cleanup: remove use of exception handling
Date: Thu, 7 Jul 2022 12:03:38 -0400 (EDT)

branch: elpa/spell-fu
commit 3898e6f59129a524834392a92634824dafee9b00
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Cleanup: remove use of exception handling
---
 spell-fu.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/spell-fu.el b/spell-fu.el
index 67236da714..08f30874c8 100644
--- a/spell-fu.el
+++ b/spell-fu.el
@@ -207,10 +207,13 @@ Argument POS return faces at this point."
 
 (defun spell-fu--file-is-older-list (file-test file-list)
   "Return t when FILE-TEST is older than any files in FILE-LIST."
-  (catch 'result
-    (dolist (file-new file-list)
-      (when (time-less-p (nth 5 (file-attributes file-test)) (nth 5 
(file-attributes file-new)))
-        (throw 'result t)))))
+  (let ((result nil))
+    (while (and file-list (null result))
+      (let ((file-new (car file-list)))
+        (setq file-list (cdr file-list))
+        (when (time-less-p (nth 5 (file-attributes file-test)) (nth 5 
(file-attributes file-new)))
+          (setq result t))))
+    result))
 
 (defun spell-fu--file-is-older (file-test &rest file-list)
   "Return t when FILE-TEST is older than any files in FILE-LIST."



reply via email to

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