]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/xwidget.el (xwidget-delete-zombies): Rewrite with dolist/memq
authorGrégoire Jadi <gregoire.jadi@gmail.com>
Thu, 25 Jul 2013 13:30:30 +0000 (15:30 +0200)
committerGrégoire Jadi <gregoire.jadi@gmail.com>
Thu, 25 Jul 2013 13:30:30 +0000 (15:30 +0200)
instead of mapcar/find.

lisp/xwidget.el

index 8bb43fec38db37dec85321a87a137333aee1732b..c0d58972e1467c46583da19a69da4a69c46f41f5 100644 (file)
@@ -440,12 +440,11 @@ It can be retrieved with `(xwidget-get XWIDGET PROPNAME)'."
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defun xwidget-delete-zombies ()
-  (mapcar (lambda (xwidget-view)
-            (when (or (not (window-live-p (xwidget-view-window xwidget-view)))
-                      (not (find (xwidget-view-model xwidget-view)
-                                 xwidget-list)))
-              (delete-xwidget-view xwidget-view)))
-          xwidget-view-list))
+  (dolist (xwidget-view xwidget-view-list)
+    (when (or (not (window-live-p (xwidget-view-window xwidget-view)))
+              (not (memq (xwidget-view-model xwidget-view)
+                         xwidget-list)))
+      (delete-xwidget-view xwidget-view))))
 
 (defun xwidget-cleanup ()
   "Delete zombie xwidgets."