Skip to content

Commit

Permalink
git-blame.el: use mapc instead of mapcar
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rüdiger Sonderfeld authored and Junio C Hamano committed Jun 10, 2012
1 parent f174a25 commit cbbc935
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/emacs/git-blame.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

Expand Down

0 comments on commit cbbc935

Please sign in to comment.