From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sergei Organov Newsgroups: gmane.emacs.help Subject: Problem advising nreverse. Date: Fri, 11 Dec 2009 16:22:16 +0300 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1260539146 28640 80.91.229.12 (11 Dec 2009 13:45:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Dec 2009 13:45:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 11 14:45:39 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NJ5oQ-00080W-ET for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Dec 2009 14:45:38 +0100 Original-Received: from localhost ([127.0.0.1]:41456 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJ5oQ-0006IE-B3 for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Dec 2009 08:45:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJ5jC-00047C-7s for help-gnu-emacs@gnu.org; Fri, 11 Dec 2009 08:40:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJ5j7-00042P-5h for help-gnu-emacs@gnu.org; Fri, 11 Dec 2009 08:40:13 -0500 Original-Received: from [199.232.76.173] (port=49926 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJ5j6-000429-VK for help-gnu-emacs@gnu.org; Fri, 11 Dec 2009 08:40:09 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:59235) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NJ5j6-0001fJ-ES for help-gnu-emacs@gnu.org; Fri, 11 Dec 2009 08:40:08 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NJ5j3-0005Um-Nj for help-gnu-emacs@gnu.org; Fri, 11 Dec 2009 14:40:05 +0100 Original-Received: from 89.175.180.246 ([89.175.180.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Dec 2009 14:40:05 +0100 Original-Received: from osv by 89.175.180.246 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Dec 2009 14:40:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 23 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 89.175.180.246 User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70591 Archived-At: Hello, It seems that an advice set for `nreverse' function fails to be called when `nreverse' is called from a byte compiled function: (let ((calls)) (defun test (problem) (setq calls (concat calls "[")) (defun foo () (nreverse '())) (and problem (byte-compile 'foo)) (defadvice nreverse (before nrev-adv activate) (setq calls (concat calls "nrev-adv"))) (foo) (ad-unadvise 'nreverse) (setq calls (concat calls "]"))) (test t) (test nil) (test t) calls) Evaluating this gives me (in either GNU Emacs 22.2.1 or GNU Emacs 23.1.1): "[][nrev-adv][]" Is it bug or feature? What's going on here?