From: Grégoire Jadi Date: Thu, 25 Jul 2013 13:30:30 +0000 (+0200) Subject: * lisp/xwidget.el (xwidget-delete-zombies): Rewrite with dolist/memq X-Git-Tag: emacs-25.0.90~2873 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7e457d94c0d3effe78d652d0141c53c41ce06b53;p=emacs.git * lisp/xwidget.el (xwidget-delete-zombies): Rewrite with dolist/memq instead of mapcar/find. --- 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."