From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alp Aker Newsgroups: gmane.emacs.devel Subject: Re: other-buffer advice on kill-buffer Date: Mon, 1 Aug 2011 21:52:18 -0400 Message-ID: References: <8662mgg2ea.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1312252816 18892 80.91.229.12 (2 Aug 2011 02:40:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 2 Aug 2011 02:40:16 +0000 (UTC) Cc: =?ISO-8859-1?Q?J=E9r=E9my_Compostella?= , emacs-devel@gnu.org To: Tim Cross Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 02 04:40:12 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qo4tu-0007Ua-Sr for ged-emacs-devel@m.gmane.org; Tue, 02 Aug 2011 04:40:11 +0200 Original-Received: from localhost ([::1]:55630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qo4te-0002e1-I8 for ged-emacs-devel@m.gmane.org; Mon, 01 Aug 2011 22:39:54 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:42836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qo49e-0002kG-2s for emacs-devel@gnu.org; Mon, 01 Aug 2011 21:52:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qo49b-0008PH-VP for emacs-devel@gnu.org; Mon, 01 Aug 2011 21:52:22 -0400 Original-Received: from mail-qw0-f41.google.com ([209.85.216.41]:51593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qo49b-0008P0-RY for emacs-devel@gnu.org; Mon, 01 Aug 2011 21:52:19 -0400 Original-Received: by qwa26 with SMTP id 26so4151836qwa.0 for ; Mon, 01 Aug 2011 18:52:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=4AThVAQzeEXnb4yEPcR/gPLPOYhFS1pDWklRLLcBt44=; b=G00DN3yanYG+fskQT3zdsi1t3A3eNIZEivwKdBxuk+xgmRCWjkgB8OLJdukDWtS6sP rPZFmx5Anz/jB34nfUbcz9JtgfFlA3ZKPcJk8q2BXFtBfaKm+8KVYN41D97frQjoTlqs Lbx195tE1Y6Ew4r4Jh8UrAgJr//Q/34VbL4V8= Original-Received: by 10.229.62.152 with SMTP id x24mr3731305qch.128.1312249938859; Mon, 01 Aug 2011 18:52:18 -0700 (PDT) Original-Received: by 10.229.102.12 with HTTP; Mon, 1 Aug 2011 18:52:18 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.216.41 X-Mailman-Approved-At: Mon, 01 Aug 2011 22:39:51 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:142663 Archived-At: 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 wi= ll only affect calls to that function made from Lisp, not calls from other primitives. J=E9r=E9my 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-buffe= r is a primitive, like kill-buffer; neither should see your advice.