[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Change in bytecomp.el breaks Gnus
From: |
Luc Teirlinck |
Subject: |
Re: Change in bytecomp.el breaks Gnus |
Date: |
Mon, 15 Nov 2004 17:57:52 -0600 (CST) |
Richard Stallman wrote:
> Most "function from cl package called at runtime" seem to involve
> situations where loading the .el file loads cl, but loading the .elc
> does not.
Do `emacs -q'.
ELISP> (load "winner")
t
ELISP> (featurep 'cl)
nil
ELISP> (load "winner.el")
t
ELISP> (featurep 'cl)
t
That will always happen when the file contains:
(eval-when-compile
(require 'cl))
because the `(require cl)' is executed when the source file is loaded,
as it should be.
However, that was _not_ the cause of the compiler warning, as I
mistakenly thought.
Here is the compiler warning:
Compiling file /home/teirllm/emacscvsdir/emacs/lisp/winner.el at Mon
Nov 15 17:27:42 2004
Entering directory `/home/teirllm/emacscvsdir/emacs/lisp/'
winner.el:53:10:Warning: Function `gensym' from cl package called at runtime
This warning is bogus. `gensym' can indeed be called at runtime, but
only if `setf' is called first, which requires cl to be loaded anyway.
Adding `with-no-warnings' as below definitely gets rid of the winner
warning. I do not know whether better solutions currently being
discussed apply to this case, nor when such better solutions would be
available.
(with-no-warnings
(defsetf winner-active-region () (store)
(if (fboundp 'zmacs-activate-region)
`(if ,store (zmacs-activate-region)
(zmacs-deactivate-region))
`(setq mark-active ,store))))
One better, currently available, solution might be to put the
`with-no-warnings' around the call to `gensym' in `defsetf'. That would
seem to get rid of all similar bogus warnings.
Sincerely,
Luc.
- Re: Change in bytecomp.el breaks Gnus, (continued)
- Re: Change in bytecomp.el breaks Gnus, Luc Teirlinck, 2004/11/14
- Re: Change in bytecomp.el breaks Gnus, Stefan Monnier, 2004/11/14
- Re: Change in bytecomp.el breaks Gnus, Richard Stallman, 2004/11/15
- Re: Change in bytecomp.el breaks Gnus, Stefan Monnier, 2004/11/15
- Re: Change in bytecomp.el breaks Gnus, Miles Bader, 2004/11/15
- Re: Change in bytecomp.el breaks Gnus, Stefan Monnier, 2004/11/15
- Re: Change in bytecomp.el breaks Gnus, Miles Bader, 2004/11/15
- Re: Change in bytecomp.el breaks Gnus, Stefan Monnier, 2004/11/15
- Re: Change in bytecomp.el breaks Gnus,
Luc Teirlinck <=
- Re: Change in bytecomp.el breaks Gnus, Nick Roberts, 2004/11/15
- Re: Change in bytecomp.el breaks Gnus, Luc Teirlinck, 2004/11/15
- Re: Change in bytecomp.el breaks Gnus, Luc Teirlinck, 2004/11/15
- Re: Change in bytecomp.el breaks Gnus, Richard Stallman, 2004/11/16