[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6750: Byte compiler: spurious message "cl used at runtime"
From: |
Juanma Barranquero |
Subject: |
bug#6750: Byte compiler: spurious message "cl used at runtime" |
Date: |
Thu, 29 Jul 2010 21:51:28 +0200 |
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