all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [emacs-w3m:09652] Warning: `mapcar' called for effect; use `mapc' or...
@ 2007-09-25  2:10 Katsumi Yamaoka
  2007-09-25  2:39 ` Katsumi Yamaoka
  2007-09-25  7:43 ` [emacs-w3m:09654] mapcar warnings (was: Warning: `mapcar' called for effect; use `mapc' or...) Leo
  0 siblings, 2 replies; 3+ messages in thread
From: Katsumi Yamaoka @ 2007-09-25  2:10 UTC (permalink / raw)
  To: emacs-w3m; +Cc: emacs-devel

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,



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-09-25  7:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-25  2:10 [emacs-w3m:09652] Warning: `mapcar' called for effect; use `mapc' or Katsumi Yamaoka
2007-09-25  2:39 ` Katsumi Yamaoka
2007-09-25  7:43 ` [emacs-w3m:09654] mapcar warnings (was: Warning: `mapcar' called for effect; use `mapc' or...) Leo

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.