GNU bug report logs -
#32754
vc-retrieve-tag-hook
Previous Next
Reported by: charles <at> aurox.ch (Charles A. Roelli)
Date: Mon, 17 Sep 2018 19:48:01 UTC
Severity: minor
Tags: fixed
Fixed in version 27.1
Done: charles <at> aurox.ch
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Here's the patch for review. Hooks in VC are documented only in
vc.el, so I have not added further documentation elsewhere.
diff --git a/etc/NEWS b/etc/NEWS
index daacf49..1d5820c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -329,6 +329,8 @@ git-grep when 'vc-git-grep' is used.
When some files are marked, only those are stashed.
When no files are marked, all modified files are stashed, as before.
+*** The new hook 'vc-retrieve-tag-hook' runs after retrieving a tag.
+
** diff-mode
*** Hunks are now automatically refined by default.
To disable it, set the new defcustom 'diff-font-lock-refine' to nil.
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index d3d66d6..243a796 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -834,6 +834,13 @@ vc-before-checkin-hook
:type 'hook
:group 'vc)
+;;;###autoload
+(defcustom vc-retrieve-tag-hook nil
+ "Normal hook (list of functions) run after retrieving a tag."
+ :type 'hook
+ :group 'vc
+ :version "27.1")
+
(defcustom vc-revert-show-diff t
"If non-nil, `vc-revert' shows a `vc-diff' buffer before querying."
:type 'boolean
@@ -2154,7 +2161,8 @@ vc-retrieve-tag
If NAME is empty, it refers to the latest revisions of the current branch.
If locking is used for the files in DIR, then there must not be any
locked files at or below DIR (but if NAME is empty, locked files are
-allowed and simply skipped)."
+allowed and simply skipped).
+This function runs the hook `vc-retrieve-tag-hook' when finished."
(interactive
(let* ((granularity
(vc-call-backend (vc-responsible-backend default-directory)
@@ -2181,6 +2189,7 @@ vc-retrieve-tag
(vc-call-backend (vc-responsible-backend dir)
'retrieve-tag dir name update)
(vc-resynch-buffer dir t t t)
+ (run-hooks 'vc-retrieve-tag-hook)
(message "%s" (concat msg "done"))))
This bug report was last modified 6 years and 231 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.