unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21683: 25.0.50; `advice-add` doesn't work for compiled primitive functions
@ 2015-10-14  1:52 Vitalie Spinu
  2015-10-18 21:16 ` Philipp Stephani
  0 siblings, 1 reply; 5+ messages in thread
From: Vitalie Spinu @ 2015-10-14  1:52 UTC (permalink / raw)
  To: 21683


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





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-19 15:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14  1:52 bug#21683: 25.0.50; `advice-add` doesn't work for compiled primitive functions Vitalie Spinu
2015-10-18 21:16 ` Philipp Stephani
2015-10-18 21:25   ` Daniel Colascione
2015-10-19 15:51     ` Vitalie Spinu
2015-10-19 15:56       ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).