[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: |
Miles Bader |
Subject: |
Re: Warning: `mapcar' called for effect; use `mapc' or `dolist' |
Date: |
Tue, 23 Oct 2007 20:28:47 +0900 |
Richard Stallman <address@hidden> writes:
> You should `defvar' mailp then.
>
> It would be unclean for Gnus to put a defvar on a general short name
> like `mailp'. That is why I think this needs a total rewrite.
In Common-Lisp, I think you use (declare (special VAR ...)) to indicate
a localized use of dynamic binding (as the first thing inside the let
form where it is bound).
Since Elisp already uses `declare' for some other things, it would seem
reasonable to also use it to inform the byte compiler that an apparently
local variable is known to be accessed non-locally.
[That warning is useful -- people often seem to forget to remove unused
let-bindings when the code that uses them is rewritten...]
-Miles
--
"Whatever you do will be insignificant, but it is very important that
you do it." Mahatma Gandhi
- 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', 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, 2007/10/31
- Re: Warning: `mapcar' called for effect; use `mapc' or `dolist', Katsumi Yamaoka, 2007/10/31