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: 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




reply via email to

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