changeset 84867:52075b268fc9

(file-cache-add-directory, file-cache-add-directory-recursively, file-cache-add-from-file-cache-buffer, file-cache-delete-file-regexp, file-cache-delete-directory, file-cache-files-matching-internal, file-cache-display): Use `mapc' rather than `mapcar'.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 25 Sep 2007 11:04:33 +0000
parents 45ab0bfaaa12
children a570abcfe00a
files lisp/filecache.el
diffstat 1 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/filecache.el	Tue Sep 25 11:03:35 2007 +0000
+++ b/lisp/filecache.el	Tue Sep 25 11:04:33 2007 +0000
@@ -280,11 +280,11 @@
 	   (dir-files (directory-files dir t regexp))
 	   )
       ;; Filter out files we don't want to see
-      (mapcar
+      (mapc
        '(lambda (file)
           (if (file-directory-p file)
               (setq dir-files (delq file dir-files))
-	    (mapcar
+	    (mapc
 	     '(lambda (regexp)
 		(if (string-match regexp file)
 		    (setq dir-files (delq file dir-files))))
@@ -386,7 +386,7 @@
     (lambda(file)
       (or (file-directory-p file)
 	  (let (filtered)
-	    (mapcar
+	    (mapc
 	     (function
 	      (lambda(regexp)
 		(and (string-match regexp file)
@@ -402,7 +402,7 @@
 Each entry matches the regular expression `file-cache-buffer-default-regexp'
 or the optional REGEXP argument."
   (set-buffer file-cache-buffer)
-  (mapcar
+  (mapc
    (function (lambda (elt)
 	       (goto-char (point-min))
 	       (delete-matching-lines elt)))
@@ -443,10 +443,10 @@
   "Delete files matching REGEXP from the file cache."
   (interactive "sRegexp: ")
   (let ((delete-list))
-    (mapcar '(lambda (elt)
-	       (and (string-match regexp (car elt))
-		    (setq delete-list (cons (car elt) delete-list))))
-	    file-cache-alist)
+    (mapc '(lambda (elt)
+	     (and (string-match regexp (car elt))
+		  (setq delete-list (cons (car elt) delete-list))))
+	  file-cache-alist)
     (file-cache-delete-file-list delete-list)
     (message "Filecache: deleted %d files from file cache"
              (length delete-list))))
@@ -456,7 +456,7 @@
   (interactive "DDelete directory from file cache: ")
   (let ((dir (expand-file-name directory))
 	(result 0))
-    (mapcar
+    (mapc
      '(lambda (entry)
 	(if (file-cache-do-delete-directory dir entry)
 	    (setq result (1+ result))))
@@ -719,7 +719,7 @@
   "Output a list of files whose names (not including directories)
 match REGEXP."
   (let ((results))
-    (mapcar
+    (mapc
      (function
       (lambda(cache-element)
 	(and (string-match regexp
@@ -768,11 +768,11 @@
     (with-current-buffer
 	(get-buffer-create buf)
       (erase-buffer)
-      (mapcar
+      (mapc
        (function
-      (lambda(item)
-	(insert (nth 1 item) (nth 0 item) "\n")))
-    file-cache-alist)
+	(lambda(item)
+	 (insert (nth 1 item) (nth 0 item) "\n")))
+       file-cache-alist)
       (pop-to-buffer buf)
     )))