 (defun svn-status-get-file-list-names (use-marked-files)
   (mapcar 'svn-status-line-info->filename (svn-status-get-file-list use-marked-files)))
 
+(defun svn-status-get-file-information ()
+  "Find out about the file under point.
+The result may be parsed with the various `svn-status-line-info->...' functions.
+When called from a *svn-status* buffer, do the same as `svn-status-get-file-information'.
+When called from a file buffer provide a structure that contains the filename."
+  (cond ((eq major-mode 'svn-status-mode)
+         (svn-status-get-file-information))
+        (t
+         ;; a fake strukture that contains the buffername for the current buffer
+         (list '(nil nil) 32 nil (buffer-file-name (current-buffer)) 0 0 "" nil nil nil nil))))
+
 (defun svn-status-select-line ()
     "Return information about the file under point.
 \(Only used for debugging\)"

;; already implied by "-function" suffix
(defvar svn-status-get-specific-revision-file-info)
(defvar svn-status-last-output-buffer-name)
(defvar svn-transient-buffers)
(defvar svn-ediff-windows)
(defvar svn-ediff-result)


(defun svn-status-blame (revision)
  "Run `svn blame' on the current file.
When called with a prefix argument, ask the user for the REVISION to use.
When called from a file buffer, go to the current line in the resulting blame output."
  (interactive "P")
  (when current-prefix-arg
    (setq revision (svn-status-read-revision-string "Blame for version: " "BASE")))
  (unless revision (setq revision "BASE"))
  (svn-run t t 'blame "blame" "-r" revision (svn-status-line-info->filename (svn-status-get-file-information))))

(defun svn-status-show-svn-diff (arg)
  "Run `svn diff' on the current file.
