[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: |
Richard Stallman |
Subject: |
Re: Warning: `mapcar' called for effect; use `mapc' or `dolist' |
Date: |
Wed, 31 Oct 2007 03:46:58 -0400 |
[I sent this message a week ago but did not get a response.]
> > (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...
If the byte compiler warns about that case, it is being too ambitious.
Thus, if the value of an expression is stored into a variable, the
compiler should consider the value "used".
So if this warning really happens, it is a bug.
Can it be reproduced?
- Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', (continued)
- 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 <=
- Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', Reiner Steib, 2007/10/31
- Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', Glenn Morris, 2007/10/31
- Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', Katsumi Yamaoka, 2007/10/31
Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', Reiner Steib, 2007/10/24