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: Reiner Steib
Subject: Re: Warning: `mapcar' called for effect; use `mapc' or `dolist'
Date: Wed, 31 Oct 2007 21:30:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

On Wed, Oct 31 2007, Richard Stallman wrote:

>     >   > (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?

I can't reproduce it.  I just updated and bootstrapped.  There was no
warning for `gnus-group.el':

  Compiling [...]/cvs-HEAD/emacs/lisp/./gnus/gnus-group.el
  Wrote [...]/cvs-HEAD/emacs/lisp/gnus/gnus-group.elc

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




reply via email to

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