]> git.eshelyaron.com Git - emacs.git/commitdiff
Restore & obsolete vc-finish-logentry-hook
authorSean Whitton <spwhitton@spwhitton.name>
Sat, 31 May 2025 08:36:25 +0000 (09:36 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 7 Jun 2025 19:54:05 +0000 (21:54 +0200)
* lisp/vc/vc-dispatcher.el (vc-finish-logentry-hook): Declare,
document and mark obsolete.
(vc-finish-logentry): Call vc-finish-logentry-hook again.

(cherry picked from commit 98c3f4c371d2c31745ea056c1286f5f407397bc2)

lisp/vc/vc-dispatcher.el

index f1491fd7f205b5af3d0e1612a683301d296b265c..5cc2dd9ade90046fc5a9bce214eec8d84f813ec5 100644 (file)
@@ -122,6 +122,15 @@ dispatcher client mode imposes itself."
   :type 'hook
   :group 'vc)
 
+;; This hook was undeclared and undocumented until declared obsolete.
+;; I believe it can be replaced with `vc-log-after-operation-hook'; if
+;; someone can demonstrate a case where this is wanted too, we can
+;; unobsolete it.  --spwhitton
+(defvar vc-finish-logentry-hook nil
+  "Additional hook run at the end of `vc-finish-logentry'.")
+(make-obsolete-variable 'vc-finish-logentry-hook 'vc-log-after-operation-hook
+                        "31.1" 'set)
+
 (defcustom vc-delete-logbuf-window t
   "If non-nil, delete the log buffer and window after each logical action.
 If nil, bury that buffer instead.
@@ -882,7 +891,7 @@ the buffer contents as a comment."
 
     ;; Now make sure we see the expanded headers
     (mapc (lambda (file) (vc-resynch-buffer file t t)) log-fileset)
-    (run-hooks after-hook)))
+    (run-hooks after-hook 'vc-finish-logentry-hook)))
 
 (defun vc-dispatcher-browsing ()
   "Are we in a directory browser buffer?"