From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.devel Subject: trunk defadvice doesn't preserve original function Date: Mon, 22 Oct 2007 12:02:31 +0900 Organization: Emacsen advocacy group Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193022217 9001 80.91.229.12 (22 Oct 2007 03:03:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Oct 2007 03:03:37 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 22 05:03:37 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IjnZp-0004ub-4b for ged-emacs-devel@m.gmane.org; Mon, 22 Oct 2007 05:03:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IjnZh-0003mL-KQ for ged-emacs-devel@m.gmane.org; Sun, 21 Oct 2007 23:03:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IjnZS-0003eh-VR for emacs-devel@gnu.org; Sun, 21 Oct 2007 23:03:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IjnZS-0003eM-54 for emacs-devel@gnu.org; Sun, 21 Oct 2007 23:03:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IjnZR-0003eI-VN for emacs-devel@gnu.org; Sun, 21 Oct 2007 23:03:13 -0400 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IjnZP-0003Dk-O2 for emacs-devel@gnu.org; Sun, 21 Oct 2007 23:03:13 -0400 Original-Received: from [66.225.201.151] (port=46140 helo=mail.jpl.org) by orlando.hostforweb.net with esmtpa (Exim 4.68) (envelope-from ) id 1IjnZD-0000je-6s for emacs-devel@gnu.org; Sun, 21 Oct 2007 22:03:02 -0500 X-Hashcash: 1:20:071022:emacs-devel@gnu.org::nbwhpRB18pq2bcGP:0000000000000000000000000000000000000000000jtW X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:Tf8DkLeZjlJnZmT54hqeMoh06gw= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:81424 Archived-At: Hi, Performing (defadvice foo ...) twice breaks `foo' if bytecomp has been loaded. You can reproduce this with `emacs -Q' as follows: (require 'bytecomp) (defun foo () "foo") (symbol-function 'foo) => (lambda nil "foo") (defadvice foo (around testing activate) (setq ad-return-value (concat ad-do-it "+bar"))) (symbol-function 'foo) => #[nil "\301^X\302 \211^P\303P\211^P)\207" [ad-return-value nil ad-Orig-foo "+bar"] 3 #("Advice doc string" 0 17 (ad-advice-info foo))] (symbol-function 'ad-Orig-foo) => (lambda nil "foo") (defadvice foo (around testing activate) (setq ad-return-value (concat ad-do-it "+bar"))) (symbol-function 'foo) => #[nil "\301^X\302 \211^P\303P\211^P)\207" [ad-return-value nil ad-Orig-foo "+bar"] 3 #("Advice doc string" 0 17 (ad-advice-info foo))] (symbol-function 'ad-Orig-foo) => #[nil "\301^X\302 \211^P\303P\211^P)\207" [ad-return-value nil ad-Orig-foo "+bar"] 3 #("Advice doc string" 0 17 (ad-advice-info foo))] That is, `ad-Orig-foo' calls `ad-Orig-foo' itself. Because of this, re-loading ~/.emacs file containing defadvice forms causes the ``Lisp nesting exceeds `max-lisp-eval-depth'' error. I don't know what's going on in the trunk but Unicode-2 has no such problem. Regards,