       (svn-log-edit-insert-files-to-commit))))
 
 (defun svn-status-pop-to-commit-buffer ()
+  "Pop to the svn commit buffer.
+If a saved log message exists in `svn-log-edit-file-name' insert it in the buffer."
   (interactive)
   (setq svn-status-pre-commit-window-configuration (current-window-configuration))
   (let* ((use-existing-buffer (get-buffer svn-log-edit-buffer-name))
          (commit-buffer (get-buffer-create svn-log-edit-buffer-name))
-         (dir default-directory))
+         (dir default-directory)
+         (log-edit-file-name))
     (pop-to-buffer commit-buffer)
     (setq default-directory dir)
+    (setq log-edit-file-name (svn-log-edit-file-name))
     (unless use-existing-buffer
-      (when (and svn-log-edit-file-name (file-readable-p svn-log-edit-file-name))
-        (insert-file-contents svn-log-edit-file-name)))
+      (when (and log-edit-file-name (file-readable-p log-edit-file-name))
+        (insert-file-contents log-edit-file-name)))
     (svn-log-edit-mode)))
 
 (defun svn-status-switch-to-status-buffer ()

(defun svn-log-edit-save-message ()
  "Save the current log message to the file `svn-log-edit-file-name'."
  (interactive)
  (write-region (point-min) (point-max) svn-log-edit-file-name))

(defun svn-log-edit-erase-edit-buffer ()
  "Delete everything in the `svn-log-edit-buffer-name' buffer."

;;; psvn.el --- Subversion interface for emacs
;; Copyright (C) 2002-2007 by Stefan Reichoer

;; Author: Stefan Reichoer, <stefan@xsteve.at>
;; $Id$
