   (define-key svn-global-keymap (kbd "u") 'svn-status-update-cmd)
   (define-key svn-global-keymap (kbd "=") 'svn-status-show-svn-diff)
   (define-key svn-global-keymap (kbd "c") 'svn-status-commit))
+
+(defvar svn-status-diff-mode-map ()
+  "Keymap used in `svn-status-diff-mode' for additional commands that are not defined in diff-mode.")
+(put 'svn-status-diff-mode-map 'risky-local-variable t) ;for Emacs 20.7
+
+(when (not svn-status-diff-mode-map)
+  (setq svn-status-diff-mode-map (copy-keymap diff-mode-shared-map))
+  (define-key svn-status-diff-mode-map [?w] 'svn-status-diff-save-current-defun-as-kill))
+
 
 (defvar svn-global-trac-map ()
   "Subkeymap used in `svn-global-keymap' for trac issue tracker commands.")

;;; Code:

(require 'easymenu)

;;; user setable variables
(defcustom svn-status-verbose t

              (when (re-search-forward "^Index: " nil t)
                (delete-region (match-beginning 0) (point-max))))
            (goto-char (setq beginning (point-max))))))))
  (svn-status-activate-diff-mode))

(defun svn-status-diff-save-current-defun-as-kill ()
  "Copy the function name for the change at point to the kill-ring.
That function uses `add-log-current-defun'"
  (interactive)
  (let ((func-name (add-log-current-defun)))
    (if func-name
        (progn
          (kill-new func-name)
          (message "Copied %S" func-name))
      (message "No current defun detected."))))


(defun svn-status-activate-diff-mode ()
  "Show the *svn-process* buffer, using the diff-mode."
  (svn-status-show-process-output 'diff t)
  (save-excursion
    (set-buffer svn-status-last-output-buffer-name)
    (svn-status-diff-mode)
    (setq buffer-read-only t)))


(define-derived-mode svn-status-diff-mode fundamental-mode "svn-diff"
  "Major mode to display svn diffs. Derives from `diff-mode'.

Commands:
\\{svn-status-diff-mode-map}
"
  (let ((diff-mode-shared-map (copy-keymap svn-status-diff-mode-map))
        major-mode mode-name)
    (diff-mode)))


(defun svn-status-show-process-buffer ()
  "Show the content of the *svn-process* buffer"
