GNU bug report logs -
#6750
Byte compiler: spurious message "cl used at runtime"
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Wed, 28 Jul 2010 18:05:02 UTC
Severity: minor
Tags: notabug
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Thu, Jul 29, 2010 at 21:03, Alan Mackenzie <acm <at> 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
This bug report was last modified 13 years and 316 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.