el/dot-emacs.el, dot/emacs: Add keybinding to update VC modelines.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 6 Jul 2018 19:38:48 +0000 (20:38 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 6 Jul 2018 19:38:48 +0000 (20:38 +0100)
Also autoreverts everything.  But that's OK.

dot/emacs
el/dot-emacs.el

index ac44ce2..293a9c9 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
   (global-set-key [?\C-c ?t ?s] 'timeclock-status-string)
   (global-set-key [?\C-c ?t ?t] 'gtags-find-tag-from-here)
   (global-set-key [?\C-c ?t ?w] 'timeclock-workday-remaining-string)
+  (global-set-key [?\C-c ?v ?v] 'mdw-auto-revert)
   (global-set-key [?\C-c ?w ?d] 'mdw-divvy-window)
   (global-set-key [?\C-c ?w ?h] 'windmove-left)
   (global-set-key [?\C-c ?w ?j] 'windmove-down)
index 48d17af..fbc3899 100644 (file)
@@ -963,6 +963,12 @@ tramp, which seems to get itself into a twist."
 (defadvice write-file (after mdw-autorevert activate)
   (mdw-check-autorevert))
 
+(defun mdw-auto-revert ()
+  "Recheck all of the autorevertable buffers, and update VC modelines."
+  (interactive)
+  (let ((auto-revert-check-vc-info t))
+    (auto-revert-buffers)))
+
 ;;;--------------------------------------------------------------------------
 ;;; Dired hacking.