git-blame.el: use mapc instead of mapcar
authorRüdiger Sonderfeld <ruediger@c-plusplus.de>
Sun, 10 Jun 2012 07:38:03 +0000 (02:38 -0500)
committerJunio C Hamano <gitster@pobox.com>
Sun, 10 Jun 2012 07:49:00 +0000 (00:49 -0700)
Using mapcar here is a waste of memory because the mapped result
is not used.

Noticed by emacs ("Warning: `mapcar' called for effect").

[jn: split from a larger patch, with new description]

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/emacs/git-blame.el

index d351cfb6e7e818f5f760e83889586c6dbf6e3a11..37d797e12419960c0698ec294b89060fd77d8d88 100644 (file)
@@ -304,7 +304,7 @@ See also function `git-blame-mode'."
 
 (defun git-blame-cleanup ()
   "Remove all blame properties"
-    (mapcar 'delete-overlay git-blame-overlays)
+    (mapc 'delete-overlay git-blame-overlays)
     (setq git-blame-overlays nil)
     (remove-git-blame-text-properties (point-min) (point-max)))