     ;; (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)
+(defun svn-log-register-link-handler (handler-id link-regexp handler-function)
+  "Register a link handler for external links in *svn-log* buffers
+HANDLER-ID is a symbolic name for this handler. The link handler is active when HANDLER-ID
+is registered in `svn-log-link-handlers'.
+LINK-REGEXP specifies a regular expression that matches the external link.
+HANDLER-FUNCTION is called with the match of LINK-REGEXP when the user clicks at the external link."
   (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)
+    (svn-puthash handler-id font-lock-desc svn-log-registered-link-handlers)))
+
+;; example: add support for ditrack links and handle them via svn-log-resolve-ditrack
+;;(svn-log-register-link-handler 'ditrack-issue "i#[0-9]+" 'svn-log-resolve-ditrack)
+;;(defun svn-log-resolve-ditrack (link-name)
 ;;  (interactive)
-;;  (message "svn-ditrack-resolve-url %s" link-name))
+;;  (message "svn-log-resolve-ditrack %s" link-name))
+
+
+(defun svn-log-resolve-trac-ticket-short (link-name)
+  "Show the trac ticket specified by LINK-NAME via `svn-trac-browse-ticket'."
+  (interactive)
+  (let ((ticket-nr (string-to-number (substring-no-properties link-name 1))))
+    (svn-trac-browse-ticket ticket-nr)))
+
+;; register the out of the box provided link handlers
+(svn-log-register-link-handler 'trac-ticket-short "#[0-9]+" 'svn-log-resolve-trac-ticket-short)
+
+;; the actually used link handlers are specified in svn-log-link-handlers
 
 ;; --------------------------------------------------------------------------------
 ;; svn-info-mode

"
  (use-local-map svn-log-view-mode-map)
  (easy-menu-add svn-log-view-mode-menu)
  (set (make-local-variable 'font-lock-defaults) '(svn-log-view-font-lock-keywords t)))

(defun svn-log-view-next ()

       'svn-status-marked-popup-face (svn-point-at-bol) (svn-point-at-eol)
       svn-log-view-mode-menu))))

(defvar svn-log-view-font-lock-basic-keywords
  '(("^r[0-9]+ .+" (0 `(face font-lock-keyword-face
                        mouse-face highlight
                        keymap ,svn-log-view-popup-menu-map))))
  "Basic keywords in `svn-log-view-mode'.")
(put 'svn-log-view-font-basic-lock-keywords 'risky-local-variable t) ;for Emacs 20.7

(define-derived-mode svn-log-view-mode fundamental-mode "svn-log-view"
  "Major Mode to show the output from svn log.
