emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bad change to tooltip.el


From: Stefan Monnier
Subject: Re: bad change to tooltip.el
Date: Sat, 20 Nov 2004 19:23:20 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

>> I think it is.  Using `fboundp' to see if a function will be available when
>> the code will be run is OK for a quick-and-dirty solution, but it's
>> otherwise just naive.

> I'm not sure I understand that,

Here's an example: if you compile a file which only contains

   (defun foo () (byte-compile-callargs-warn form))

you won't get any warning, no matter how separate and clean an Emacs process
you use for the byte-compilation and even though `form' is not defvar'd
anywhere and byte-compile-callargs-warn will not be defined at runtime.

> but the usual problem with not compiling in a clean Emacs is that you have
> something loaded already (e.g. cl-macs) which masks the fact that the Lisp
> in question needs a require, autoload, or whatever.  That's what I found
> quite a lot in Gnus stuff when it was used without most of Gnus loaded.

I know, but I think the better solution is that in
byte-compile-callargs-warn, instead of using fboundp, we should track the
function name through load-history and things like that to see whether it
will be available at runtime, given the set of requires specified in
the file.


        Stefan




reply via email to

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