From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.devel Subject: Re: new fboundp behavior weird Date: Sun, 30 Dec 2012 12:57:15 +0100 Organization: EUR Message-ID: <878v8fhhwk.fsf@gmail.com> References: <87mwwxhyve.fsf@gmail.com> <87d2xtm3x8.fsf@gmail.com> <3BF3680C402B4A718A15428F0A33EE5E@us.oracle.com> <871ue8eowy.fsf@gmail.com> <87sj6or167.fsf@gmail.com> <87k3rzhm5m.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1356868648 28176 80.91.229.3 (30 Dec 2012 11:57:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Dec 2012 11:57:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 30 12:57:44 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 1TpHWP-0004aH-Ex for ged-emacs-devel@m.gmane.org; Sun, 30 Dec 2012 12:57:41 +0100 Original-Received: from localhost ([::1]:58253 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TpHWA-0002N1-Jv for ged-emacs-devel@m.gmane.org; Sun, 30 Dec 2012 06:57:26 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TpHW6-0002Mq-Lm for emacs-devel@gnu.org; Sun, 30 Dec 2012 06:57:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TpHW2-0004jz-QW for emacs-devel@gnu.org; Sun, 30 Dec 2012 06:57:22 -0500 Original-Received: from mail-wi0-f177.google.com ([209.85.212.177]:41100) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TpHW2-0004jg-Jk for emacs-devel@gnu.org; Sun, 30 Dec 2012 06:57:18 -0500 Original-Received: by mail-wi0-f177.google.com with SMTP id hm2so6621315wib.10 for ; Sun, 30 Dec 2012 03:57:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:organization:references:date :in-reply-to:message-id:user-agent:mime-version:content-type; bh=Bz4SZxAtBIQwYKspeTPbgy1+KvkFCIU+SYuU5ZQv1Fo=; b=rF6kmUNjVtVbZ724WQSq4fT83AAArS54gEcWRuB5dWBZ+tpBm96MlPDrwVX7EFpI4n xcxfWK6vqEhODDZUfm4Srmg1Eq90JYy+tjofoetK5d4EX0cy4Ja4caUDm4gQ+/27Iw0O MgC9OHPvBOp+S8T0YndV6mWqXzg4dF+y7kMkdJ4YOX2K1KBaCWtkKMiL0ELQvKVgg5G4 nBduHE37t5VbpoW2V7eZN9+ZW2Wf3ZzUcwMpI5wCINFydo8f6lnMXIsaO0EPOHAtM21c /YNN2nl0f7W/EUW37r4Bm8I7ZouQyUgIBzYGQs5kNPR7LGrUXCFRGgEOtxZvqlZKyshu 1wSg== X-Received: by 10.194.123.105 with SMTP id lz9mr60907462wjb.43.1356868637766; Sun, 30 Dec 2012 03:57:17 -0800 (PST) Original-Received: from localhost (i108036.upc-i.chello.nl. [62.195.108.36]) by mx.google.com with ESMTPS id l5sm64211947wia.10.2012.12.30.03.57.16 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 30 Dec 2012 03:57:16 -0800 (PST) In-Reply-To: <87k3rzhm5m.fsf@gmail.com> (Vitalie Spinu's message of "Sun, 30 Dec 2012 11:25:25 +0100") User-Agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.2.91 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.212.177 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:156013 Archived-At: --=-=-= Content-Type: text/plain >> Vitalie Spinu >> on Sun, 30 Dec 2012 11:25:25 +0100 wrote: >> Thierry Volpiatto >> on Sat, 29 Dec 2012 22:36:16 +0100 wrote: VS> [...] TV> (defalias 'toto 'titi) TV> (debugger-special-form-p 'toto) ; Used in 24.2 TV> =>nil ; OK TV> (special-form-p 'toto) ; Used in 24.3 TV> => TV> Debugger entered--Lisp error: (void-function toto) TV> indirect-function(toto) TV> (setq object (indirect-function object)) TV> (if (and (symbolp object) (fboundp object)) (setq object (indirect-function object))) VS> Interesting. This part from emacs 24.2 debugger-special-form-p is VS> apparently missing: VS> (subrp (symbol-function symbol)) VS> Does that mean that emacs 24.3 has special forms that are not built-in? Well, not really. I have just checked the trunk; indirect-function call misses 'no-error argument. It probably should be: --=-=-= Content-Type: text/x-diff Content-Disposition: inline Modified lisp/subr.el diff --git a/lisp/subr.el b/lisp/subr.el index 1e50903..3b27e7b 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2805,7 +2805,7 @@ Otherwise, return nil." (defun special-form-p (object) "Non-nil if and only if OBJECT is a special form." (if (and (symbolp object) (fboundp object)) - (setq object (indirect-function object))) + (setq object (indirect-function object 'no-error))) (and (subrp object) (eq (cdr (subr-arity object)) 'unevalled))) (defun field-at-pos (pos) --=-=-= Content-Type: text/plain Content-Disposition: inline This fixes the problem. A slightly off topic naive question. Why is the function cell void by default and not nil? Is this useful for anything? Vitalie --=-=-=--