 (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))
+  (let ((log-edit-file-name (svn-log-edit-file-name)))
+    (if (string= buffer-file-name log-edit-file-name)
+        (save-buffer)
+      (write-region (point-min) (point-max) 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-2006 by Stefan Reichoer

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

           (getenv "SVN_ASP_DOT_NET_HACK"))
      "_svn"
    ".svn"))

(defun svn-log-edit-file-name (&optional curdir)
  "Get the name of the saved log edit file
If curdir, return `svn-log-edit-file-name'
Otherwise position svn-log-edit-file-name in the root directory of this working copy"
  (if curdir
      svn-log-edit-file-name
    (concat (svn-status-base-dir) svn-log-edit-file-name)))

(defun svn-status-message (level &rest args)
  "If LEVEL is lower than `svn-status-debug-level' print ARGS using `message'.
