From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Frederik Newsgroups: gmane.emacs.help Subject: Re: Make defadvice mode local Date: Sun, 03 Nov 2013 20:54:46 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1383508524 23246 80.91.229.3 (3 Nov 2013 19:55:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Nov 2013 19:55:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 03 20:55:29 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vd3lg-0003c4-Op for geh-help-gnu-emacs@m.gmane.org; Sun, 03 Nov 2013 20:55:28 +0100 Original-Received: from localhost ([::1]:46547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vd3lg-0001jp-Da for geh-help-gnu-emacs@m.gmane.org; Sun, 03 Nov 2013 14:55:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vd3lN-0001dz-Ne for help-gnu-emacs@gnu.org; Sun, 03 Nov 2013 14:55:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vd3lF-0002wc-Vp for help-gnu-emacs@gnu.org; Sun, 03 Nov 2013 14:55:09 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:41788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vd3lF-0002wT-Q1 for help-gnu-emacs@gnu.org; Sun, 03 Nov 2013 14:55:01 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Vd3lE-0003JK-ET for help-gnu-emacs@gnu.org; Sun, 03 Nov 2013 20:55:00 +0100 Original-Received: from dslb-094-218-044-056.pools.arcor-ip.net ([94.218.44.56]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Nov 2013 20:55:00 +0100 Original-Received: from freak.fred by dslb-094-218-044-056.pools.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Nov 2013 20:55:00 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 14 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dslb-094-218-044-056.pools.arcor-ip.net User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:94309 Archived-At: > Pieces of advice are always activated globally. So what you want to do > is to make this advice do nothing (which in this case means, do just > "ad-to-it") when the buffer is not under version-control. > > E.g. use (if (not (and buffer-file-name (vc-backend buffer-file-name))) > ad-do-it > ) This works like a charm! Thanks! Regards -- Frederik