Function: speedbar-find-selected-file
speedbar-find-selected-file is a byte-compiled function defined in
speedbar.el.gz.
Signature
(speedbar-find-selected-file FILE)
Documentation
Go to the line where FILE is.
Source Code
;; Defined in /usr/src/emacs/lisp/speedbar.el.gz
(defun speedbar-find-selected-file (file)
"Go to the line where FILE is."
(set-buffer speedbar-buffer)
(goto-char (point-min))
(let ((m nil))
(while (and (setq m (re-search-forward
(concat " \\(" (regexp-quote (file-name-nondirectory file))
"\\)\\(" speedbar-indicator-regex "\\)?\n")
nil t))
(not (string= file
(concat
(speedbar-line-directory
(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)))))