[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: |
Glenn Morris |
Subject: |
Re: Warning: `mapcar' called for effect; use `mapc' or `dolist' |
Date: |
Wed, 31 Oct 2007 17:19:23 -0400 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Richard Stallman wrote:
> 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?
There's nothing to worry about AFAICS:
(let ((foo (mapcar (lambda (e) e) '(a b c))))) ; warning
(let ((foo (mapcar (lambda (e) e) '(a b c)))) ; no warning
foo)
(defvar foo nil)
(defun foo-func ()
foo)
(let ((foo (mapcar (lambda (e) e) '(a b c)))) ; no warning
(foo-func))
- Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', (continued)
- 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
- 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 <=
- 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