bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4423: [PATCH] lisp/vc-dispatcher.el: at the end of vc-log-operation


From: Jari Aalto
Subject: bug#4423: [PATCH] lisp/vc-dispatcher.el: at the end of vc-log-operation run vc-start-logentry-hook
Date: Sun, 13 Sep 2009 17:01:28 +0300

This new hook allows users to set up the initial contents of *VC-Log* buffer.

2009-09-13  Jari Aalto  <address@hidden>

    * vc-dispatcher.el (vc-start-logentry-hook): New user variable.
    (vc-start-logentry): run `vc-start-logentry-hook' at end.

>From 623988d6819a83f897c218db8a637fc505afd1b6 Mon Sep 17 00:00:00 2001
From: Jari Aalto <address@hidden>
Date: Sun, 13 Sep 2009 16:56:51 +0300
Subject: [PATCH] lisp/vc-dispatcher.el: at end of vc-log-operation run 
vc-start-logentry-hook

Signed-off-by: Jari Aalto <address@hidden>
---
 lisp/vc-dispatcher.el |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/lisp/vc-dispatcher.el b/lisp/vc-dispatcher.el
index a209e13..4282e52 100644
--- a/lisp/vc-dispatcher.el
+++ b/lisp/vc-dispatcher.el
@@ -136,6 +136,13 @@ preserve the setting."
   :type 'boolean
   :group 'vc)
 
+(defcustom vc-start-logentry-hook nil
+  "Normal hook (list of functions) run after `vc-start-logentry'.
+See `run-hooks'."
+  :type 'hook
+  :group 'vc
+  :version "23.2")
+
 ;; Variables the user doesn't need to know about.
 
 (defvar vc-log-operation nil)
@@ -541,7 +548,9 @@ INITIAL-CONTENTS is nil, do action immediately as if the 
user had
 entered COMMENT.  If COMMENT is t, also do action immediately with an
 empty comment.  Remember the file's buffer in `vc-parent-buffer'
 \(current one if no file).  AFTER-HOOK specifies the local value
-for `vc-log-after-operation-hook'."
+for `vc-log-after-operation-hook'.
+
+At the end, runs the normal hook `vc-start-logentry-hook'."
   (let ((parent
          (if (vc-dispatcher-browsing)
              ;; If we are called from a directory browser, the parent buffer is
@@ -567,7 +576,8 @@ for `vc-log-after-operation-hook'."
       (when (stringp comment) (insert comment)))
     (if (or (not comment) initial-contents)
        (message "%s  Type C-c C-c when done" msg)
-      (vc-finish-logentry (eq comment t)))))
+      (vc-finish-logentry (eq comment t)))
+    (run-hooks 'vc-start-logentry-hook)))
 
 (declare-function vc-dir-move-to-goal-column "vc-dir" ())
 
-- 
1.6.3.3


reply via email to

[Prev in Thread] Current Thread [Next in Thread]