all messages for Emacs-related lists mirrored at yhetil.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

* 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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.