From: Miles Bader <miles.bader@necel.com>
To: emacs-devel@gnu.org
Subject: Re: Warning: `mapcar' called for effect; use `mapc' or `dolist'
Date: Tue, 23 Oct 2007 20:28:47 +0900 [thread overview]
Message-ID: <buo640y6pe8.fsf@dhapc248.dev.necel.com> (raw)
In-Reply-To: <E1IkHAU-00044J-9b@fencepost.gnu.org> (Richard Stallman's message of "Tue\, 23 Oct 2007 06\:39\:26 -0400")
Richard Stallman <rms@gnu.org> writes:
> You should `defvar' mailp then.
>
> It would be unclean for Gnus to put a defvar on a general short name
> like `mailp'. That is why I think this needs a total rewrite.
In Common-Lisp, I think you use (declare (special VAR ...)) to indicate
a localized use of dynamic binding (as the first thing inside the let
form where it is bound).
Since Elisp already uses `declare' for some other things, it would seem
reasonable to also use it to inform the byte compiler that an apparently
local variable is known to be accessed non-locally.
[That warning is useful -- people often seem to forget to remove unused
let-bindings when the code that uses them is rewritten...]
-Miles
--
"Whatever you do will be insignificant, but it is very important that
you do it." Mahatma Gandhi
next prev parent reply other threads:[~2007-10-23 11:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200710200643.l9K6h9gk021348@oogie-boogie.ics.uci.edu>
[not found] ` <b4mtzojbb4c.fsf@jpl.org>
2007-10-22 18:49 ` Warning: `mapcar' called for effect; use `mapc' or `dolist' Reiner Steib
2007-10-22 20:07 ` Dan Nicolaescu
2007-10-22 20:55 ` Reiner Steib
2007-10-22 21:04 ` Dan Nicolaescu
2007-10-22 21:39 ` Glenn Morris
2007-10-23 1:01 ` Miles Bader
2007-10-23 10:39 ` Richard Stallman
2007-10-23 11:28 ` Miles Bader [this message]
2007-10-24 2:50 ` Richard Stallman
2007-10-23 10:39 ` Richard Stallman
[not found] ` <E1IkHAF-00040s-KJ@fencepost.gnu.org>
2007-10-27 10:46 ` Risky variables in Gnus (was: Warning: `mapcar' called for effect; use `mapc' or `dolist') Reiner Steib
2007-10-27 23:41 ` Richard Stallman
2007-10-28 0:02 ` Risky variables in Gnus Reiner Steib
2007-11-01 20:51 ` Reiner Steib
2007-10-31 7:46 ` Warning: `mapcar' called for effect; use `mapc' or `dolist' Richard Stallman
2007-10-31 20:30 ` Reiner Steib
2007-10-31 21:19 ` Glenn Morris
2007-11-01 2:35 ` Katsumi Yamaoka
2007-10-24 19:28 ` Reiner Steib
2007-10-24 22:18 ` Katsumi Yamaoka
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=buo640y6pe8.fsf@dhapc248.dev.necel.com \
--to=miles.bader@necel.com \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.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.