Function: speedbar-mode
speedbar-mode is an interactive and byte-compiled function defined in
speedbar.el.gz.
Signature
(speedbar-mode)
Documentation
Major mode for managing a display of directories and tags.
The first line represents the default directory of the speedbar frame.
Each directory segment is a button which jumps speedbar's default
directory to that directory. Buttons are activated by clicking M-x speedbar-click (speedbar-click).
In some situations using S-<mouse-2> (dframe-power-click) is a power click which will
rescan cached items, or pop up new frames.
Each line starting with <+> represents a directory. Click on the <+>
to insert the directory listing into the current tree. Click on the
<-> to retract that list. Click on the directory name to go to that
directory as the default.
Each line starting with [+] is a file. If the variable
speedbar-show-unknown-files is t, the lines starting with [?] are
files which don't have imenu support, but are not expressly ignored.
Files are completely ignored if they match speedbar-file-unshown-regexp
which is generated from completion-ignored-extensions.
Files with a * character after their name are files checked out of a
version control system. (Currently only RCS is supported.) New
version control systems can be added by examining the documentation
for speedbar-this-file-in-vc and speedbar-vc-check-dir-p.
Files with a # or ! character after them are source files that
have an object file associated with them. The ! indicates that the
files is out of date. You can control what source/object associations
exist through the variable speedbar-obj-alist.
Click on the [+] to display a list of tags from that file. Click on the [-] to retract the list. Click on the file name to edit the file in the attached frame.
If you open tags, you might find a node starting with {+}, which is a category of tags. Click the {+} to expand the category. Jump-able tags start with >. Click the name of the tag to go to that position in the selected file.
<down-mouse-3> dframe-popup-kludge
<follow-link> mouse-face
<mode-line> <down-mouse-1> dframe-popup-kludge
<mode-line> <mouse-2> dframe-mouse-hscroll
<motion-state> : evil-ex
<motion-state> RET speedbar-edit-line
<motion-state> h backward-char
<motion-state> i speedbar-item-info
<motion-state> j speedbar-next
<motion-state> k speedbar-prev
<motion-state> l forward-char
<motion-state> o speedbar-toggle-line-expansion
<motion-state> r speedbar-refresh
<motion-state> u speedbar-up-directory
<mouse-2> dframe-click
<mouse-movement> dframe-track-mouse
C-<down-mouse-1> dframe-hack-buffer-menu
C-M-n speedbar-forward-list
C-M-p speedbar-backward-list
C-x b dframe-switch-buffer-attached-frame
H #<anonymous-function>
M-n speedbar-restricted-next
M-p speedbar-restricted-prev
Q delete-frame
S-<mouse-2> dframe-power-click(var)/dframe-power-click(fun)
SPC..~ undefined
b #<anonymous-function>
f #<anonymous-function>
g speedbar-refresh
h #<anonymous-function>
n speedbar-next
p speedbar-prev
q dframe-close-frame
r #<anonymous-function>
t speedbar-toggle-updates
This mode runs the hook speedbar-mode-hook, as the final or
penultimate step during initialization.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/speedbar.el.gz
(define-derived-mode speedbar-mode fundamental-mode "Speedbar"
"Major mode for managing a display of directories and tags.
\\<speedbar-mode-map>
The first line represents the default directory of the speedbar frame.
Each directory segment is a button which jumps speedbar's default
directory to that directory. Buttons are activated by clicking `\\[speedbar-click]'.
In some situations using `\\[dframe-power-click]' is a `power click' which will
rescan cached items, or pop up new frames.
Each line starting with <+> represents a directory. Click on the <+>
to insert the directory listing into the current tree. Click on the
<-> to retract that list. Click on the directory name to go to that
directory as the default.
Each line starting with [+] is a file. If the variable
`speedbar-show-unknown-files' is t, the lines starting with [?] are
files which don't have imenu support, but are not expressly ignored.
Files are completely ignored if they match `speedbar-file-unshown-regexp'
which is generated from `completion-ignored-extensions'.
Files with a `*' character after their name are files checked out of a
version control system. (Currently only RCS is supported.) New
version control systems can be added by examining the documentation
for `speedbar-this-file-in-vc' and `speedbar-vc-check-dir-p'.
Files with a `#' or `!' character after them are source files that
have an object file associated with them. The `!' indicates that the
files is out of date. You can control what source/object associations
exist through the variable `speedbar-obj-alist'.
Click on the [+] to display a list of tags from that file. Click on
the [-] to retract the list. Click on the file name to edit the file
in the attached frame.
If you open tags, you might find a node starting with {+}, which is a
category of tags. Click the {+} to expand the category. Jump-able
tags start with >. Click the name of the tag to go to that position
in the selected file.
\\{speedbar-mode-map}"
(save-excursion
(setq font-lock-keywords nil) ;; no font-locking please
(setq truncate-lines t)
(setq-local frame-title-format "Speedbar")
(setq case-fold-search nil
buffer-read-only t)
(speedbar-set-mode-line-format)
;; Add in our dframe hooks.
(if speedbar-track-mouse-flag
(setq dframe-track-mouse-function #'speedbar-track-mouse))
(setq dframe-help-echo-function #'speedbar-item-info
dframe-mouse-click-function #'speedbar-click
dframe-mouse-position-function #'speedbar-position-cursor-on-line)
(setq-local tab-bar-mode nil)
(setq tab-line-exclude nil))
speedbar-buffer)