all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jari Aalto <jari.aalto@cante.net>
To: Emacs bug BTS <submit@emacsbugs.donarmstrong.com>
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	[thread overview]
Message-ID: <87vdjnlz9j.fsf@jondo.cante.net> (raw)

[-- 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


             reply	other threads:[~2009-09-13 14:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-13 14:01 Jari Aalto [this message]
2009-09-14  1:28 ` bug#4423: [PATCH] lisp/vc-dispatcher.el: at the end of vc-log-operation run vc-start-logentry-hook Stefan Monnier
2011-07-12  7:43   ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vdjnlz9j.fsf@jondo.cante.net \
    --to=jari.aalto@cante.net \
    --cc=4423@emacsbugs.donarmstrong.com \
    --cc=submit@emacsbugs.donarmstrong.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.