 (defun svn-status-marked-files ()
   "Return all files marked by `svn-status-set-user-mark',
 or (if no files were marked) the file under point."
-  (let* ((st-info svn-status-info)
-         (file-list))
-    (while st-info
-      (when (svn-status-line-info->has-usermark (car st-info))
-        (setq file-list (append file-list (list (car st-info)))))
-      (setq st-info (cdr st-info)))
-    (or file-list
-        (if (svn-status-get-line-information)
-            (list (svn-status-get-line-information))
-          nil))))
+  (if (eq major-mode 'svn-status-mode)
+      (let* ((st-info svn-status-info)
+             (file-list))
+        (while st-info
+          (when (svn-status-line-info->has-usermark (car st-info))
+            (setq file-list (append file-list (list (car st-info)))))
+          (setq st-info (cdr st-info)))
+        (or file-list
+            (if (svn-status-get-line-information)
+                (list (svn-status-get-line-information))
+              nil)))
+    ;; different mode, means called not from the *svn-status* buffer
+    (if svn-status-get-line-information-for-file
+        (list (svn-status-make-line-info (if (eq svn-status-get-line-information-for-file 'relative)
+                                             (file-relative-name (buffer-file-name) (svn-status-base-dir))
+                                           (buffer-file-name))))
+      (list (svn-status-make-line-info ".")))))
 
 (defun svn-status-marked-file-names ()
   (mapcar 'svn-status-line-info->filename (svn-status-marked-files)))

        svn-info)
    ;; different mode, means called not from the *svn-status* buffer
    (if svn-status-get-line-information-for-file
        (svn-status-make-line-info (file-relative-name (buffer-file-name) (svn-status-base-dir)))
      (svn-status-make-line-info "."))))




;;; default arguments to pass to svn commands
;; TODO: When customizing, an option menu or completion might be nice....
(defcustom svn-status-default-log-arguments '("-v")
  "*List of arguments to pass to svn log.
\(used in `svn-status-show-svn-log'; override these by giving prefixes\)."
  :type '(repeat string)
