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 22:36:16 +0100	[thread overview]
Message-ID: <87sj6or167.fsf@gmail.com> (raw)
In-Reply-To: D93D5776658C4101AD85928B1E40AC97@us.oracle.com

"Drew Adams" <drew.adams@oracle.com> writes:

>> debug-on-entry is using `fboundp'.
>
> I don't think the call to fboundp in debug-on-entry is a problem - it is only in
> the `interactive' spec.  And (fboundp 'foo) correctly returns t.
Don't think so, the problem IMO comes from here:

(defalias 'toto 'titi)

(debugger-special-form-p 'toto) ; Used in 24.2
=>nil ; OK

(special-form-p 'toto) ; Used in 24.3
=>
Debugger entered--Lisp error: (void-function toto)
  indirect-function(toto)
  (setq object (indirect-function object))
  (if (and (symbolp object) (fboundp object)) (setq object (indirect-function object)))
  special-form-p(toto)
  eval((special-form-p (quote toto)) nil)
  eval-last-sexp-1(t)
  eval-last-sexp(t)
  eval-print-last-sexp()
  call-interactively(eval-print-last-sexp nil nil)


> The problem is perhaps due to Emacs 24's removal of this part of debug-on-entry
> (from Emacs 23), which handles aliased functions:
>
> ;; The function is built-in or aliased to another function.
> ;; Create a wrapper in which we can add the debug call.
> (fset function `(lambda (&rest debug-on-entry-args)
> 			,(interactive-form (symbol-function function))
> 			(apply ',(symbol-function function)
> 			       debug-on-entry-args)))
>
> Dunno.  Whatever the cause, the debugger does not show a frame for bar - it
> seems to treat foo as if it were bar.
>
>> (defalias 'foo 'bar)
>> (setq debug-on-error t)
>> M-x debug-on-entry RET foo TAB
>> And then you get the error.
>
> Yes, evalling (foo) using C-x C-e raises the error, in both 24.2 and trunk:
>
> Debugger entered--Lisp error: (void-function foo)
>   (foo)
>   eval((foo) nil)
>   eval-last-sexp-1(nil)
>   eval-last-sexp(nil)
>   call-interactively(eval-last-sexp nil nil)
>
> But in Emacs 23 (and prior) that does not happen.  Instead, this:
>
> Debugger entered--Lisp error: (void-function bar)
> * bar()
> * apply(bar nil)
> * foo()
>   eval((foo))
>   eval-last-sexp-1(nil)
>   eval-last-sexp(nil)
>   call-interactively(eval-last-sexp nil nil)
>
> I agree that there is a bug, presumably in the debugger.  I don't think there is
> a problem with fboundp, however.  (fboundp 'foo) correctly returns t.
>
>
>

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




  reply	other threads:[~2012-12-29 21:36 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
2012-12-29 20:56       ` Drew Adams
2012-12-29 21:36         ` Thierry Volpiatto [this message]
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=87sj6or167.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).