+(defun speedbar-find-selected-file (file)
+ "Goto the line where FILE is."
+ (goto-char (point-min))
+ (let ((m nil))
+ (while (and (setq m (re-search-forward
+ (concat " \\(" (file-name-nondirectory file)
+ "\\)\\(" speedbar-indicator-regex "\\)?\n")
+ nil t))
+ (not (string= file
+ (concat
+ (speedbar-line-path
+ (save-excursion
+ (goto-char (match-beginning 0))
+ (beginning-of-line)
+ (save-match-data
+ (looking-at "[0-9]+:")
+ (string-to-number (match-string 0)))))
+ (match-string 1))))))
+ (if m
+ (progn
+ (goto-char (match-beginning 1))
+ (match-string 1)))))
+