[Top][All Lists]

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

Re: other-buffer advice on kill-buffer

From: Alp Aker
Subject: Re: other-buffer advice on kill-buffer
Date: Mon, 1 Aug 2011 21:52:18 -0400

Tim Cross wrote:

> From memory, you cannot advise functions implemented in C, only those
> implemented in elisp.

That's not correct.  You can advise a primitive function, but the advice will
only affect calls to that function made from Lisp, not calls from other

Jérémy Compostella wrote:

>> I have tried to advice the other-buffer function which seems called
>> (Cf. buffer.c) but my advice is never called in this case. Indeed, my
>> other-buffer advice is correctly called on switch-to-buffer call but
>> never on kill-buffer call.

Are you sure your advice on other-buffer is being called when
switch-to-buffer is called?  That shouldn't be possible, as switch-to-buffer
is a primitive, like kill-buffer; neither should see your advice.

reply via email to

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