[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem advising nreverse.

From: Sergei Organov
Subject: Problem advising nreverse.
Date: Fri, 11 Dec 2009 16:22:16 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)


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")))
    (ad-unadvise 'nreverse)
    (setq calls (concat calls "]")))
  (test t) (test nil) (test t)

Evaluating this gives me (in either GNU Emacs 22.2.1 or GNU Emacs 23.1.1):


Is it bug or feature? What's going on here? 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]