Function: speedbar-tag-file

speedbar-tag-file is a byte-compiled function defined in speedbar.el.gz.

Signature

(speedbar-tag-file TEXT TOKEN INDENT)

Documentation

The cursor is on a selected line. Expand the tags in the specified file.

The parameter TEXT and TOKEN are required, where TEXT is the button clicked, and TOKEN is the file to expand. INDENT is the current indentation level.

Source Code

;; Defined in /usr/src/emacs/lisp/speedbar.el.gz
(defun speedbar-tag-file (text token indent)
  "The cursor is on a selected line.  Expand the tags in the specified file.
The parameter TEXT and TOKEN are required, where TEXT is the button
clicked, and TOKEN is the file to expand.  INDENT is the current
indentation level."
  (cond ((string-search "+" text)	;we have to expand this file
	 (let* ((fn (expand-file-name (concat (speedbar-line-directory indent)
					      token)))
		(lst (speedbar-fetch-dynamic-tags fn)))
	   ;; if no list, then remove expando button
	   (if (not lst)
	       (speedbar-change-expand-button-char ??)
	     (speedbar-change-expand-button-char ?-)
	     (speedbar-with-writable
	       (save-excursion
		 (end-of-line) (forward-char 1)
		 (funcall (car lst) indent (cdr lst)))))))
	((string-search "-" text)	;we have to contract this node
	 (speedbar-change-expand-button-char ?+)
	 (speedbar-delete-subblock indent))
	(t (error "Ooops...  not sure what to do")))
  (speedbar-center-buffer-smartly))