[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make defadvice mode local
From: |
Stefan Monnier |
Subject: |
Re: Make defadvice mode local |
Date: |
Sun, 03 Nov 2013 09:37:04 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> which are under version control. So I seek a way to only activate the
> advice in buffers with vc-mode enabled...
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
<do-the-special-thing>)
-- Stefan