[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")
ELISP> (featurep 'cl)
ELISP> (load "winner.el")
ELISP> (featurep 'cl)

That will always happen when the file contains:

  (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

 (defsetf winner-active-region () (store)
   (if (fboundp 'zmacs-activate-region)
       `(if ,store (zmacs-activate-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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]