unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: emacs-w3m@namazu.org
Cc: emacs-devel@gnu.org
Subject: [emacs-w3m:09652] Warning: `mapcar' called for effect; use `mapc' or...
Date: Tue, 25 Sep 2007 11:10:58 +0900	[thread overview]
Message-ID: <b4mfy13mr4d.fsf@jpl.org> (raw)

Hi,

The most recent Emacs CVS warns about the use of mapcar when
compling emacs-w3m as follows:

In w3m-session-save:
w3m-session.el:126:6:Warning: `mapcar' called for effect; use `mapc' or
    `dolist' instead

In w3m-session-select:
w3m-session.el:242:8:Warning: `mapcar' called for effect; use `mapc' or
    `dolist' instead

In toplevel form:
shimbun/sb-tdiary.el:162:8:Warning: `mapcar' called for effect; use `mapc' or
    `dolist' instead

The beginning two warnings are proper.  Using mapc or dolist makes
the programs run fast, though it is not necessarily necessary.
However, the last one is improper.  The code warned is:

(luna-define-method shimbun-groups ((shimbun shimbun-tdiary))
  (mapcar 'car shimbun-tdiary-group-alist))

It should return a list of the `car's of `shimbun-tdiary-group-alist'.
Why it is warned may be that the bytecomp doesn't know what the
`luna-define-method' macro does.  Any idea?  I think pulling out
the `mapcar' element from `byte-compile-warnings' is not a good idea.

Regards,



             reply	other threads:[~2007-09-25  2:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-25  2:10 Katsumi Yamaoka [this message]
2007-09-25  2:39 ` Warning: `mapcar' called for effect; use `mapc' or Katsumi Yamaoka
2007-09-25  7:43 ` [emacs-w3m:09654] mapcar warnings (was: Warning: `mapcar' called for effect; use `mapc' or...) Leo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4mfy13mr4d.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-w3m@namazu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).