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: Richard Stallman
Subject: Re: Warning: `mapcar' called for effect; use `mapc' or `dolist'
Date: Tue, 23 Oct 2007 06:39:12 -0400

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





reply via email to

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