unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: new fboundp behavior weird
Date: Sat, 29 Dec 2012 18:41:49 +0100	[thread overview]
Message-ID: <871ue8eowy.fsf@gmail.com> (raw)
In-Reply-To: 3BF3680C402B4A718A15428F0A33EE5E@us.oracle.com

"Drew Adams" <drew.adams@oracle.com> 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	other threads:[~2012-12-29 17:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-29 11:38 new fboundp behavior weird Thierry Volpiatto
2012-12-29 12:35 ` Thierry Volpiatto
2012-12-29 16:27   ` Drew Adams
2012-12-29 17:41     ` Thierry Volpiatto [this message]
2012-12-29 20:56       ` Drew Adams
2012-12-29 21:36         ` Thierry Volpiatto
2012-12-30 10:25           ` Vitalie Spinu
2012-12-30 11:57             ` Vitalie Spinu
2012-12-29 16:32   ` Andreas Schwab
2012-12-31  3:06 ` Stefan Monnier
2012-12-31  6:51   ` Thierry Volpiatto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871ue8eowy.fsf@gmail.com \
    --to=thierry.volpiatto@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).