>From 627c54175d9287143499ed42be91d3fcc42a74b1 Mon Sep 17 00:00:00 2001 From: David Caldwell Date: Thu, 27 Aug 2015 11:04:51 -0700 Subject: [PATCH] Add vc-activate (interactive) to activate VC mode on the current buffer (which may have been added to revision control behind Emacs's back). * lisp/vc/vc-hooks.el (vc-activate): New; interactive way to activate VC mode on the current buffer. --- lisp/vc/vc-hooks.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index bae9919..1c12b01 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -851,6 +851,11 @@ current, and kill the buffer that visits the link." (add-hook 'find-file-hook 'vc-find-file-hook) +(defun vc-activate () + "Activate VC mode on current buffer if appropriate." + (interactive) + (vc-find-file-hook)) + (defun vc-kill-buffer-hook () "Discard VC info about a file when we kill its buffer." (when buffer-file-name (vc-file-clearprops buffer-file-name))) -- 2.5.0