     ;;(message "psvn: Saving initial window configuration")
     (setq svn-status-initial-window-configuration
           (current-window-configuration)))
-  (let* ((status-buf (get-buffer-create svn-status-buffer-name))
+  (let* ((cur-buf (current-buffer))
+         (status-buf (get-buffer-create svn-status-buffer-name))
          (proc-buf (get-buffer-create "*svn-process*"))
          (want-edit (eq arg '-))
          (status-option (if want-edit

                ;; never opens a pseudoterminal.
                (apply 'call-process svn-exe nil proc-buf nil arglist))
              (setq svn-status-mode-line-process-status "")
              (svn-status-update-mode-line)))
          (setq svn-status-pre-run-svn-buffer (current-buffer))))
    (error "You can only run one svn process at once!")))

(defun svn-process-sentinel-fixup-path-seperators ()

  ;;(princ (format "Process: %s had the event `%s'" process event)))
  ;;(save-excursion
  (let ((act-buf (current-buffer)))
    (when svn-pre-run-mode-line-process
      (with-current-buffer svn-status-pre-run-svn-buffer
        (setq mode-line-process svn-pre-run-mode-line-process))
      (setq svn-pre-run-mode-line-process nil))
    (set-buffer (process-buffer process))
    (setq svn-status-mode-line-process-status "")
    (svn-status-update-mode-line)
