 (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."

    (goto-char (point-min))
    (flush-lines "^## .*")))


;; --------------------------------------------------------------------------------
;; svn-log-view-mode:

;;; Commentary

;; psvn.el is tested with GNU Emacs 21.3 on windows, debian linux,
;; freebsd5, red hat el4, ubuntu edgy with svn 1.4.0

;; psvn.el is an interface for the revision control tool subversion
;; (see http://subversion.tigris.org)
