unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Alan Mackenzie <acm@muc.de>
Cc: 6750@debbugs.gnu.org
Subject: bug#6750: Byte compiler: spurious message "cl used at runtime"
Date: Thu, 29 Jul 2010 21:51:28 +0200	[thread overview]
Message-ID: <AANLkTikEsB9MDOR8v6vfqxg8Lb91+SuaRBEgDy3Rjuj-@mail.gmail.com> (raw)
In-Reply-To: <20100729190306.GA2459@muc.de>

On Thu, Jul 29, 2010 at 21:03, Alan Mackenzie <acm@muc.de> wrote:

> Or, perhaps you could indulge me a little, and show an example of mapcan
> (or some other cl function) which isn't "use at runtime".

;; at top level
(eval-when-compile
   (mapcan ...))

> I put it to you that that error message is not, in general, helpful.  I
> think it should be restricted to uses of mapcan at runtime (in a defun)
> or when it's in the form generated by a macro.

But the point is that the macro could be called at runtime and
`mapcan' would not be defined.

Try byte-compiling test.el:
--------------------------------------------------------------------------------
(eval-when-compile (require 'cl))

(defmacro mapcan-at-runtime ()
  `(setq sample ',(mapcan 'identity '((a) (b) (c)))))
--------------------------------------------------------------------------------

(which produces the warning), and then

emacs -Q -l test.elc
M-: (mapcan-at-runtime) <RET>

    Juanma





  reply	other threads:[~2010-07-29 19:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28 18:15 bug#6750: Byte compiler: spurious message "cl used at runtime" Alan Mackenzie
2010-07-28 23:01 ` Stefan Monnier
2010-07-29 19:03   ` Alan Mackenzie
2010-07-29 19:51     ` Juanma Barranquero [this message]
2010-07-30  9:18     ` Stefan Monnier
2011-07-14 13:28       ` Lars Magne Ingebrigtsen

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=AANLkTikEsB9MDOR8v6vfqxg8Lb91+SuaRBEgDy3Rjuj-@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=6750@debbugs.gnu.org \
    --cc=acm@muc.de \
    /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).