 "
   (use-local-map svn-log-view-mode-map)
   (easy-menu-add svn-log-view-mode-menu)
+  (set (make-local-variable 'svn-log-view-font-lock-keywords) svn-log-view-font-lock-basic-keywords)
+  (dolist (lh svn-log-link-handlers)
+    (add-to-list 'svn-log-view-font-lock-keywords (gethash lh svn-log-registered-link-handlers)))
   (set (make-local-variable 'font-lock-defaults) '(svn-log-view-font-lock-keywords t)))
 
 (defun svn-log-view-next ()

    ;; (message "svn-log-resolve-link '%s'" link-name)
    (funcall (get-text-property (point) 'link-handler) link-name)))

(defun svn-log-add-link-handler (link-regexp handler-function)
  (let ((font-lock-desc (list link-regexp '(0 `(face font-lock-function-name-face
                                            mouse-face highlight
                                            link-handler invalid-handler-function
                                            keymap ,svn-log-link-keymap)))))
    ;; no idea, how to use handler-function in invalid-handler-function above, so set it here
    (setcar (nthcdr 5 (nth 1 (nth 1 (nth 1 font-lock-desc)))) handler-function)
    (add-to-list 'svn-log-view-font-lock-keywords font-lock-desc)))

;; example: add support for ditrack links and handle them via svn-ditrack-resolve-url
;;(svn-log-add-link-handler "i#[0-9]+" 'svn-ditrack-resolve-url)
;;(defun svn-ditrack-resolve-url (link-name)
;;  (interactive)
;;  (message "svn-ditrack-resolve-url %s" link-name))

;; --------------------------------------------------------------------------------
;; svn-info-mode


(defvar svn-status-load-state-before-svn-status t
  "*Whether to automatically restore state from ++psvn.state file before running svn-status.")

(defvar svn-log-link-handlers nil "A list of link handlers in *svn-log* buffers.
These link handlers must be registered via `svn-log-register-link-handler'")

;;; hooks
(defvar svn-status-mode-hook nil "Hook run when entering `svn-status-mode'.")
