all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#4423: [PATCH] lisp/vc-dispatcher.el: at the end of vc-log-operation run vc-start-logentry-hook
@ 2009-09-13 14:01 Jari Aalto
  2009-09-14  1:28 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Jari Aalto @ 2009-09-13 14:01 UTC (permalink / raw)
  To: Emacs bug BTS

[-- Attachment #1: Type: text/plain, Size: 259 bytes --]


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

2009-09-13  Jari Aalto  <jari.aalto@cante.net>

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-vc-dispatcher.el-at-end-of-vc-log-operation-run.patch --]
[-- Type: text/x-diff, Size: 1845 bytes --]

From 623988d6819a83f897c218db8a637fc505afd1b6 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
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 <jari.aalto@cante.net>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-12  7:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-13 14:01 bug#4423: [PATCH] lisp/vc-dispatcher.el: at the end of vc-log-operation run vc-start-logentry-hook Jari Aalto
2009-09-14  1:28 ` Stefan Monnier
2011-07-12  7:43   ` Glenn Morris

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.