[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21683: 25.0.50; `advice-add` doesn't work for compiled primitive fun
From: |
Vitalie Spinu |
Subject: |
bug#21683: 25.0.50; `advice-add` doesn't work for compiled primitive functions |
Date: |
Wed, 14 Oct 2015 03:52:47 +0200 |
Hi,
Put this function into a file, compile the file and then load the file:
(defun foobar ()
(save-restriction
(widen)))
then:
(defun restrict-widen (orig-widen)
(message "here")
(apply orig-widen nil))
(advice-add 'widen :around #restrict-widen)
(foobar)
The advice is not triggered.
Eval the `foobar` definition interactively and the advice will start
working. The problem occurs only for primitive c functions. Elisp
functions are fine. It doesn't work with 24.4.1 either.
Vitalie
In GNU Emacs 25.0.50.3 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
of 2015-09-26
Repository revision: 139e55a58466058a8c9ae54536cb790ac7b7cc64
Windowing system distributor 'The X.Org Foundation', version 11.0.11600000
System Description: Ubuntu 14.10
- bug#21683: 25.0.50; `advice-add` doesn't work for compiled primitive functions,
Vitalie Spinu <=