lisp/doc-view.el: Silence compiler warning.
authorJuanma Barranquero <lekktu@gmail.com>
Sun, 5 Jun 2011 00:18:46 +0000 (02:18 +0200)
committerJuanma Barranquero <lekktu@gmail.com>
Sun, 5 Jun 2011 00:18:46 +0000 (02:18 +0200)
lisp/ChangeLog
lisp/doc-view.el

index ed08474..91bf824 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-05  Juanma Barranquero  <lekktu@gmail.com>
+
+       * doc-view.el (doc-view-remove-if): Move computation of result out
+       of `dolist' to silence misleading lexical-binding warning.
+
 2011-06-04  Chong Yidong  <cyd@stupidchicken.com>
 
        * emacs-lisp/timer.el (timer-activate): Remove unused arg.
index 7bd1a55..06c3b70 100644 (file)
@@ -614,9 +614,10 @@ It's a subdirectory of `doc-view-cache-directory'."
 (defun doc-view-remove-if (predicate list)
   "Return LIST with all items removed that satisfy PREDICATE."
   (let (new-list)
-    (dolist (item list (nreverse new-list))
+    (dolist (item list)
       (when (not (funcall predicate item))
-       (setq new-list (cons item new-list))))))
+       (setq new-list (cons item new-list))))
+     (nreverse new-list)))
 
 ;;;###autoload
 (defun doc-view-mode-p (type)