 (defvar svn-status-mode-branch-map ()
   "Subkeymap used in `svn-status-mode' for branching commands.")
 (put 'svn-status-mode-extension-map 'risky-local-variable t) ;for Emacs 20.7
+(defvar svn-status-mode-search-map ()
+  "Subkeymap used in `svn-status-mode' for search commands.")
+(put 'svn-status-mode-search-map      'risky-local-variable t) ;for Emacs 20.7
 
 (when (not svn-status-mode-map)
   (setq svn-status-mode-map (make-sparse-keymap))

  (interactive "sGrep files for: ")
  (unless grep-command
    (grep-compute-defaults))
  (let ((default-directory (svn-status-base-dir)))
    (grep (format "%s %s %s" grep-command (shell-quote-argument regexp)
                  (mapconcat 'identity (svn-status-marked-file-names) " ")))))

(defun svn-status-search-files (search-string)
  "Search selected file(s) for a fixed SEARCH-STRING.

  (define-key svn-status-mode-map (kbd "~") 'svn-status-get-specific-revision)
  (define-key svn-status-mode-map (kbd "E") 'svn-status-ediff-with-revision)

  (define-key svn-status-mode-map (kbd "n") 'svn-status-next-line)
  (define-key svn-status-mode-map (kbd "p") 'svn-status-previous-line)
  (define-key svn-status-mode-map (kbd "<down>") 'svn-status-next-line)
  (define-key svn-status-mode-map (kbd "<up>") 'svn-status-previous-line)
  (define-key svn-status-mode-map (kbd "C-x C-j") 'svn-status-dired-jump)
  (define-key svn-status-mode-map [down-mouse-3] 'svn-status-popup-menu))

(when (not svn-status-mode-mark-map)
  (setq svn-status-mode-mark-map (make-sparse-keymap))
  (define-key svn-status-mode-map (kbd "*") svn-status-mode-mark-map)
  (define-key svn-status-mode-mark-map (kbd "!") 'svn-status-unset-all-usermarks)
