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

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

[nongnu] elpa/spell-fu 2590ee3002 80/86: Cleanup: remove cl-remove-if-no


From: ELPA Syncer
Subject: [nongnu] elpa/spell-fu 2590ee3002 80/86: Cleanup: remove cl-remove-if-not
Date: Thu, 7 Jul 2022 12:03:45 -0400 (EDT)

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

    Cleanup: remove cl-remove-if-not
    
    Prefer to avoid common-lisp API, stick to simple emacs lisp.
---
 spell-fu.el | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/spell-fu.el b/spell-fu.el
index f95bc4546e..334254fa4e 100644
--- a/spell-fu.el
+++ b/spell-fu.el
@@ -206,23 +206,26 @@ Notes:
 ACTION is 'remove or 'add.  Returned candidates are dictionaries
 which support the operation, and correspondingly do / do not
 already contain WORD."
-
   (let
     (
       (adding (eq action 'add))
       (encoded-word (encode-coding-string (downcase word) 'utf-8)))
-    (cl-remove-if-not
-      (lambda (dict)
-        (and
-          ;; Operation supported?
-          (get
-            dict
-            (if adding
-              'add-word
-              'remove-word))
-          ;; Word is / is not in dictionary?
-          (eq adding (null (gethash encoded-word (symbol-value dict))))))
-      spell-fu-dictionaries)))
+    (delq
+      nil
+      (mapcar
+        (lambda (dict)
+          (and
+            ;; Operation supported?
+            (get
+              dict
+              (if adding
+                'add-word
+                'remove-word))
+            ;; Word is / is not in dictionary?
+            (eq adding (null (gethash encoded-word (symbol-value dict))))
+            ;; Result.
+            dict))
+        spell-fu-dictionaries))))
 
 (defun spell-fu--read-dictionary (candidate-dicts prompt)
   "Ask the user to select one dictionary from CANDIDATE-DICTS.



reply via email to

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