emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Warning: `mapcar' called for effect; use `mapc' or `dolist'


From: Reiner Steib
Subject: Re: Warning: `mapcar' called for effect; use `mapc' or `dolist'
Date: Mon, 22 Oct 2007 22:55:29 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

On Mon, Oct 22 2007, Dan Nicolaescu wrote:

> Reiner Steib <address@hidden> writes:
>   > On Mon, Oct 22 2007, Katsumi Yamaoka wrote:
>   > > For instance, `mapcar' used in `gnus-group-highlight-line'
>   > > cannot be replaced with `mapc' even if the compiler warns it.
>   > 
>   > Could the byte-compiler be improved not to warn about such cases?
>   > Here's the relevant code:
>   > 
>   > (defun gnus-group-highlight-line ()
>   >   "Highlight the current line according to `gnus-group-highlight'."
[...]
> It seems that `mailp' is not used in that function. 

`mailp' is used implicitly through the variable `gnus-group-highlight'
which is let-bound to `list'.  `list' is used in the body of the
let-form.

> Adding a use for it makes the warning go away...

Hm, I can't reproduce the warning using `emacs-lisp-byte-compile' with
GNU Emacs 23.0.50.6 (i686-pc-linux-gnu, GTK+ Version 2.10.6) of 2007-10-20.
Too old?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]