From 7e457d94c0d3effe78d652d0141c53c41ce06b53 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Jadi?= Date: Thu, 25 Jul 2013 15:30:30 +0200 Subject: [PATCH] * lisp/xwidget.el (xwidget-delete-zombies): Rewrite with dolist/memq instead of mapcar/find. --- lisp/xwidget.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lisp/xwidget.el b/lisp/xwidget.el index 8bb43fec38d..c0d58972e14 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el @@ -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." -- 2.39.2