git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-blame.el: Fix compilation warnings.

From
Rüdiger Sonderfeld <ruediger@c-plusplus.de>
Date
Jan 12, 2012, 17:08 UTC
Message-ID
<2304907.sEfEeC6Eon@descartes>
In-Reply-To
<20120112162617.GA2479@burratino>
Hi,
On Thursday 12 January 2012 10:26:41 Jonathan Nieder wrote:
> These lines should be left out [*].
Sorry, I wasn't sure whether to remove them or not. I followed the description 
in git-format-patch(1) on how to send patches with kmail. I'll remove them in 
the future. Thanks for the advice.
 
Show 8 quoted lines
> I assume this was prompted by warning messages like this one:
> 
> 	In git-blame-cleanup:
> 	git-blame.el:306:6:Warning: `mapcar' called for effect; use `mapc' or
> `dolist' instead
> 
> Looks reasonable to my very much untrained eyes, and it's consistent
> with the hints Kevin gave at [1].

Yes. I think the warnings are correct and should be addressed. E.g. Using mapcar compared to mapc is slower due to the required accumulation of the results and the additional garbage collection costs. It's not very dramatic but there is no reason not to fix it imho.

Regards, Rüdiger

Previous: Jonathan NiederNext: Jonathan Nieder
Message 3 of 18 in “git-blame.el: Fix compilation warnings.”
  1. git-blame.el: Fix compilation warnings.Rüdiger Sonderfeld, Jan 12, 2012
  2. Jonathan NiederJan 12, 2012
  3. Rüdiger SonderfeldJan 12, 2012
  4. Sending patches with KMail (Re: [PATCH] git-blame.el: Fix compilation warnings.)Jonathan Nieder, Jan 13, 2012
  5. Junio C HamanoJan 14, 2012
  6. Jonathan NiederJan 14, 2012
  7. Jonathan NiederJan 14, 2012
  8. Junio C HamanoJan 15, 2012
  9. Rüdiger SonderfeldJan 14, 2012
  10. git-blame.el: use mapc instead of mapcarJonathan Nieder, Jun 10, 2012
  11. 1/3 git-blame.el: Do not use goto-line in lisp codeLawrence Mitchell, Jun 10, 2012
  12. 2/3 git-blame.el: Use with-current-buffer where appropriateLawrence Mitchell, Jun 10, 2012
  13. 3/3 git-blame.el: Do not use bare 0 to mean (point-min)Lawrence Mitchell, Jun 10, 2012
  14. Jonathan NiederJun 14, 2012
  15. Lawrence MitchellJun 14, 2012
  16. 1/3 git-blame.el: Do not use goto-line in lisp codeLawrence Mitchell, Jun 14, 2012
  17. 2/3 git-blame.el: Use with-current-buffer where appropriateLawrence Mitchell, Jun 14, 2012
  18. 3/3 git-blame.el: Do not use bare 0 to mean (point-min)Lawrence Mitchell, Jun 14, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.