Subject: Re: bug#17884: 24.3.92; `vc-next-action' discards commit message

From: Glenn Morris <[email-masked]>
Date: Mon, 14 Jul 2014 15:31:12 -0400

I applied this, which hopefully covers it.

--- a/lisp/vc/vc-dispatcher.el	2014-07-12 02:24:02 +0000
+++ b/lisp/vc/vc-dispatcher.el	2014-07-14 19:29:29 +0000
@@ -591,12 +591,19 @@
 
 ;; Set up key bindings for use while editing log messages
 
+(declare-function log-edit-empty-buffer-p "log-edit" ())
+
 (defun vc-log-edit (fileset mode backend)
   "Set up `log-edit' for use on FILE."
   (setq default-directory
 	(buffer-local-value 'default-directory vc-parent-buffer))
+  (require 'log-edit)
   (log-edit 'vc-finish-logentry
-	    (= (point-min) (point-max))
+	    ;; Setup a new log message if the log buffer is "empty",
+	    ;; or was previously used for a different set of files.
+	    (or (log-edit-empty-buffer-p)
+		(and (local-variable-p 'vc-log-fileset)
+		     (not (equal vc-log-fileset fileset))))
 	    `((log-edit-listfun . (lambda ()
                                     ;; FIXME: Should expand the list
                                     ;; for directories.