From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: new fboundp behavior weird Date: Sat, 29 Dec 2012 22:36:16 +0100 Organization: Emacs Helm Message-ID: <87sj6or167.fsf@gmail.com> References: <87mwwxhyve.fsf@gmail.com> <87d2xtm3x8.fsf@gmail.com> <3BF3680C402B4A718A15428F0A33EE5E@us.oracle.com> <871ue8eowy.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1356816994 1328 80.91.229.3 (29 Dec 2012 21:36:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Dec 2012 21:36:34 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 29 22:36:50 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tp45I-0007Mv-2V for ged-emacs-devel@m.gmane.org; Sat, 29 Dec 2012 22:36:48 +0100 Original-Received: from localhost ([::1]:51347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tp453-0001ki-82 for ged-emacs-devel@m.gmane.org; Sat, 29 Dec 2012 16:36:33 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tp44z-0001kd-RZ for emacs-devel@gnu.org; Sat, 29 Dec 2012 16:36:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tp44y-0000p6-MM for emacs-devel@gnu.org; Sat, 29 Dec 2012 16:36:29 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:59762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tp44y-0000p2-Fk for emacs-devel@gnu.org; Sat, 29 Dec 2012 16:36:28 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Tp45A-0007Hs-ER for emacs-devel@gnu.org; Sat, 29 Dec 2012 22:36:40 +0100 Original-Received: from lbe83-2-78-243-104-167.fbx.proxad.net ([78.243.104.167]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Dec 2012 22:36:40 +0100 Original-Received: from thierry.volpiatto by lbe83-2-78-243-104-167.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Dec 2012 22:36:40 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 75 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lbe83-2-78-243-104-167.fbx.proxad.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.91 (gnu/linux) Cancel-Lock: sha1:RfZ+agpROewiPZmcPWIZEJusHxE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:156006 Archived-At: "Drew Adams" 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