[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warning: `mapcar' called for effect; use `mapc' or `dolist'
From: |
Dan Nicolaescu |
Subject: |
Re: Warning: `mapcar' called for effect; use `mapc' or `dolist' |
Date: |
Mon, 22 Oct 2007 14:04:38 -0700 |
Reiner Steib <address@hidden> writes:
> 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?
I can't either. I thought that adding a use for mailp fixed the
warning for me, I didn't try it before that.
- Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', Reiner Steib, 2007/10/22
- Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', Dan Nicolaescu, 2007/10/22
- Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', Reiner Steib, 2007/10/22
- Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', Miles Bader, 2007/10/22
- Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', Richard Stallman, 2007/10/23
- Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', Miles Bader, 2007/10/23
- Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', Richard Stallman, 2007/10/23
- Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', Richard Stallman, 2007/10/23
- Message not available
- Risky variables in Gnus (was: Warning: `mapcar' called for effect; use `mapc' or `dolist'), Reiner Steib, 2007/10/27
- Re: Risky variables in Gnus (was: Warning: `mapcar' called for effect; use `mapc' or `dolist'), Richard Stallman, 2007/10/27
- Re: Risky variables in Gnus, Reiner Steib, 2007/10/27
- Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', Richard Stallman, 2007/10/31