emacs-devel
[Top][All Lists]
Advanced

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

Re: new fboundp behavior weird


From: Thierry Volpiatto
Subject: Re: new fboundp behavior weird
Date: Sat, 29 Dec 2012 18:41:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

"Drew Adams" <address@hidden> writes:

>> > the new behavior of fboundp seems really bad.
>> > For example debug-on-entry fail on functions not already 
>> > bound but have an alias.
>> >
>> > NOTE: This is reproductible only on the trunk, not emacs-24 
>> > branch which is working fine.
>> >
>> To reproduce:
>> emacs -Q
>> (defalias 'foo 'bar)
>> (setq debug-on-error t)
>> M-x debug-on-entry RET foo TAB
>> 
>> NOTE:
>> (fboundp 'foo)
>> =>t
>> (symbol-function 'foo)
>> =>bar
>> So a fix using in addition of `fboundp' `symbol-function' would not
>> work.  i.e `symbol-function' is not returning nil. 
>> Anyway `fboundp' is used in so many places...
>
> I'm probably misunderstanding, but that is reproducible on all Emacs versions
> going back at least to Emacs 20.  And it looks like correct behavior, to me.
>
> What am I missing?  Just what is the problem with the behavior you report?  
> And
> are you sure it is not reproducible on the Emacs 24 branch?  (I don't have the
> branch, but it is reproducible in Emacs 24.2.)
>
> Symbol `foo' does have a function-cell definition: the symbol `bar'.  That
> symbol `bar' has no function definition is immaterial to whether `foo' is
> `fboundp'.  Perhaps you are looking for `functionp' instead of `fboundp'?
No, debug-on-entry is using `fboundp'.
 
You have to run this to reproduce:
emacs -Q
(defalias 'foo 'bar)
(setq debug-on-error t)
M-x debug-on-entry RET foo TAB
And then you get the error.

I know it is stupid to make such aliases, but some packages (DVC) use
such aliases on non--existing functions. 
(I guess the non--existing functions are build
during compilation if backend is available)

Anyway `debug-on-entry' should ignore this instead of sending error,
like it does on emacs-24 branch.

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




reply via email to

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