aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2000-10-20 22:24:55 +0000
committerEli Zaretskii2000-10-20 22:24:55 +0000
commitf29906f81219ca87a3368d1d5c58d185a843ccad (patch)
tree57e675b53b339ca865db5352d0a9e6d07401f872
parent13c844fb71c9bc7031fdac50561938b62bb75bfd (diff)
downloademacs-f29906f81219ca87a3368d1d5c58d185a843ccad.tar.gz
emacs-f29906f81219ca87a3368d1d5c58d185a843ccad.zip
Correct typos, fix markup, add index entries.
-rw-r--r--man/ChangeLog4
-rw-r--r--man/speedbar.texi386
2 files changed, 231 insertions, 159 deletions
diff --git a/man/ChangeLog b/man/ChangeLog
index 3ac72d360ff..4fd8591508a 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,7 @@
12000-10-21 Eli Zaretskii <eliz@is.elta.co.il>
2
3 * speedbar.texi: Correct typos, fix markup, add index entries.
4
12000-10-19 Eric M. Ludlam <zappo@ultranet.com> 52000-10-19 Eric M. Ludlam <zappo@ultranet.com>
2 6
3 * speedbar.texi: New file 7 * speedbar.texi: New file
diff --git a/man/speedbar.texi b/man/speedbar.texi
index 33cb023af31..96a955af8bc 100644
--- a/man/speedbar.texi
+++ b/man/speedbar.texi
@@ -1,6 +1,6 @@
1\input texinfo @c -*-texinfo-*- 1\input texinfo @c -*-texinfo-*-
2@c 2@c
3@c $Id$ 3@c $Id: speedbar.texi,v 1.1 2000/10/20 01:53:35 zappo Exp $
4@c 4@c
5 5
6@c This file is part of GNU Emacs 6@c This file is part of GNU Emacs
@@ -37,6 +37,8 @@ END-INFO-DIR-ENTRY
37Copyright @copyright{} 1999, 2000 Eric M. Ludlam 37Copyright @copyright{} 1999, 2000 Eric M. Ludlam
38@end titlepage 38@end titlepage
39 39
40@syncodeindex fn cp
41
40@node Top, , , (dir)Top 42@node Top, , , (dir)Top
41@comment node-name, next, previous, up 43@comment node-name, next, previous, up
42 44
@@ -58,23 +60,23 @@ user. For example, when using the file view, the current buffer's file
58is highlighted. Speedbar also mimics the explorer windows by providing 60is highlighted. Speedbar also mimics the explorer windows by providing
59multiple display modes. These modes come in two flavors. Major display 61multiple display modes. These modes come in two flavors. Major display
60modes remain consistent across buffers, and minor display modes appear 62modes remain consistent across buffers, and minor display modes appear
61only when a buffer of the applicable type is shown. This provides 63only when a buffer of the applicable type is shown. This allows
62authors of other packages to provide speedbar summaries customized to 64authors of other packages to provide speedbar summaries customized to
63the needs of that mode. 65the needs of that mode.
64 66
65Throughout this manual, activities are defined as "clicking on", or 67Throughout this manual, activities are defined as "clicking on", or
66"expanding" items. Clicking means using using @kbd{mouse-2} on a 68"expanding" items. Clicking means using using @kbd{mouse-2} on a
67button. Expanding refers to clicking on an expansion button to display 69button. Expanding refers to clicking on an expansion button to display
68an expanded summary of the entry the exapansion button is 70an expanded summary of the entry the expansion button is
69on. @xref{Basic Navigation}. 71on. @xref{Basic Navigation}.
70 72
71@menu 73@menu
72* Introduction:: Basics of speedbar. 74* Introduction:: Basics of speedbar.
73* Basic Navigation:: Basics of speedbar common between all modes. 75* Basic Navigation:: Basics of speedbar common between all modes.
74* File Mode:: Summerizing files. 76* File Mode:: Summarizing files.
75* Buffer Mode:: Summerizing buffers. 77* Buffer Mode:: Summarizing buffers.
76* Minor Modes:: Additional minor modes such as Info and RMAIL. 78* Minor Modes:: Additional minor modes such as Info and RMAIL.
77* Customizing:: Changing speedbar behaviors. 79* Customizing:: Changing speedbar behavior.
78* Extending:: Extend speedbar for your own project. 80* Extending:: Extend speedbar for your own project.
79* Index:: 81* Index::
80@end menu 82@end menu
@@ -87,27 +89,29 @@ on. @xref{Basic Navigation}.
87To start using speedbar use the command @kbd{M-x speedbar RET} or select 89To start using speedbar use the command @kbd{M-x speedbar RET} or select
88it from the Tools menu in versions of Emacs with speedbar installed by 90it from the Tools menu in versions of Emacs with speedbar installed by
89default. This command will open a new frame to summarize the local 91default. This command will open a new frame to summarize the local
90files. On X windows, or under Windows NT, speedbar's frame is twenty 92files. On X Window systems or on MS-Windows, speedbar's frame is twenty
91characters wide, and will mimic the height of the frame from which it 93characters wide, and will mimic the height of the frame from which it
92was started. It positions itself to the left or right of the frame you 94was started. It positions itself to the left or right of the frame you
93started it from. 95started it from.
94 96
95To use speedbar effectivly, it is important to understand its 97To use speedbar effectivly, it is important to understand its
96relationship with the frame you started it from. This frame is the 98relationship with the frame you started it from. This frame is the
97"attached frame" which speedbar will use as a reference point. Once 99@dfn{attached frame} which speedbar will use as a reference point. Once
98started speedbar will watch the contents of this frame, and attempts to 100started, speedbar watches the contents of this frame, and attempts to
99make it's contents relevant to the buffer loaded into the attached 101make it's contents relevant to the buffer loaded into the attached
100frame. In addition, all requests made in speedbar that require the 102frame. In addition, all requests made in speedbar that require the
101display of another buffer will display in the attached frame. 103display of another buffer will display in the attached frame.
102 104
103When used in terminal mode, the new frame appears the same size as the 105When used in terminal mode, the new frame appears the same size as the
104terminal. Since it is not visible while working in the attached frame, 106terminal. Since it is not visible while working in the attached frame,
105speedbar will save time by using "slowbar" mode, where no tracking is 107speedbar will save time by using the @dfn{slowbar mode}, where no tracking is
106done until speedbar is requested to show itself. 108done until speedbar is requested to show itself (i.e., the speedbar's
109frame becomes the selected frame).
107 110
111@cindex @code{speedbar-get-focus}
108The function to use when switching between frames using the keyboard is 112The function to use when switching between frames using the keyboard is
109@code{speedbar-get-focus}. This function will toggle between frames, and 113@code{speedbar-get-focus}. This function will toggle between frames, and
110useful to bind to a key in terminal mode @xref{Customizing}. 114it's useful to bind it to a key in terminal mode. @xref{Customizing}.
111 115
112@node Basic Navigation, File Mode, Introduction, Top 116@node Basic Navigation, File Mode, Introduction, Top
113@comment node-name, next, previous, up 117@comment node-name, next, previous, up
@@ -131,34 +135,38 @@ to use.
131@cindex keybindings 135@cindex keybindings
132 136
133These keybindings are common across all modes: 137These keybindings are common across all modes:
138
134@table @kbd 139@table @kbd
135@item delete, SPC 140@item delete, SPC
136@cindex scrolling 141@cindex scrolling in speedbar
137Scroll up and down one page. 142Scroll up and down one page.
138@item Q 143@item Q
139@cindex quitting 144@cindex quitting speedbar
140Quit speedbar, and kill the frame. 145Quit speedbar, and kill the frame.
141@item q 146@item q
142Quit speedbar, and hide the frame. This makes it faster to restore the 147Quit speedbar, and hide the frame. This makes it faster to restore the
143speedbar frame. 148speedbar frame, than if you press @kbd{Q}.
144@item g 149@item g
145@cindex refresh 150@cindex refresh speedbar display
146Refresh whatever contents are in speedbar. 151Refresh whatever contents are in speedbar.
147@item t 152@item t
148@cindex slowbar 153@cindex slowbar mode
149Toggle speedbar to and from slowbar mode. In slowbar mode, frame 154Toggle speedbar to and from slowbar mode. In slowbar mode, frame
150tracking is not done. 155tracking is not done.
151@item n, p 156@item n
157@itemx p
152@cindex navigation 158@cindex navigation
153Move to the next or previous item. A summary of that item will be 159Move, respectively, to the next or previous item. A summary of that
154displayed in the attached frame's minibuffer. 160item will be displayed in the attached frame's minibuffer.
155@item M-n, M-p 161@item M-n
162@itemx M-p
156Move to the next or previous item in a restricted fashion. If a list is 163Move to the next or previous item in a restricted fashion. If a list is
157open, the cursor will skip over it. If the cursor is in an open list, 164open, the cursor will skip over it. If the cursor is in an open list,
158it will not leave it. 165it will not leave it.
159@item C-M-n, C-M-n 166@item C-M-n
167@itemx C-M-n
160Move forwards and backwards across extended groups. This lets you 168Move forwards and backwards across extended groups. This lets you
161quickly skip over all files, or directories, or other common sub-item at 169quickly skip over all files, directories, or other common sub-items at
162the same current depth. 170the same current depth.
163@item C-x b 171@item C-x b
164Switch buffers in the attached frame. 172Switch buffers in the attached frame.
@@ -171,27 +179,29 @@ switch into these different modes.
171@cindex mode switching hotkeys 179@cindex mode switching hotkeys
172@table @kbd 180@table @kbd
173@item b 181@item b
174Switch into Quick Buffers mode @xref{Buffer Mode}. After one use, the 182Switch into Quick Buffers mode (@pxref{Buffer Mode}). After one use, the
175previous display mode is restored. 183previous display mode is restored.
176@item f 184@item f
177Switch into Files mode. 185Switch into File mode.
178@item r 186@item r
179Switch back to the previous mode. 187Switch back to the previous mode.
180@end table 188@end table
181 189
182Some modes provide groups, lists and tags. @xref{Basic Visuals}. When 190Some modes provide groups, lists and tags. @xref{Basic Visuals}. When
183these are available some additional common bindings are available. 191these are available, some additional common bindings are available.
184 192
185@cindex common keys 193@cindex common keys
186@table @kbd 194@table @kbd
187@item RET, e 195@item RET
196@itemx e
188Edit/Open the current group or tag. This behavior is dependent on the 197Edit/Open the current group or tag. This behavior is dependent on the
189mode. In general, files or buffers are opened in the attached frame, 198mode. In general, files or buffers are opened in the attached frame,
190and directories or group nodes are expanded locally. 199and directories or group nodes are expanded locally.
191@item +,= 200@item +
201@itemx =
192Expand the current group, displaying sub items. 202Expand the current group, displaying sub items.
193When used with a prefix argument, any data that may have been cached is 203When used with a prefix argument, any data that may have been cached is
194flushed. This is similar to a power click. @xref{Mouse Bindings}. 204flushed. This is similar to a power click. @xref{Mouse Bindings}.
195@item - 205@item -
196Contract the current group, hiding sub items. 206Contract the current group, hiding sub items.
197@end table 207@end table
@@ -203,16 +213,16 @@ Contract the current group, hiding sub items.
203 213
204Speedbar has visual cues for indicating different types of data. These 214Speedbar has visual cues for indicating different types of data. These
205cues are used consistently across the different speedbar modes to make 215cues are used consistently across the different speedbar modes to make
206them easier to understand. 216them easier to interpret.
207 217
208At a high level, in Files mode, there are directory buttons, sub 218At a high level, in File mode, there are directory buttons, sub
209directory buttons, file buttons, tag buttons, and expansion buttons. 219directory buttons, file buttons, tag buttons, and expansion buttons.
210This makes it easy to use the mouse to navigate a directory tree, and 220This makes it easy to use the mouse to navigate a directory tree, and
211quickly view files, or a summary of those files. 221quickly view files, or a summary of those files.
212 222
213The most basic visual effect used to distinguis between these button 223The most basic visual effect used to distinguis between these button
214types is color and mouse highlighting. Anything the mouse highlights 224types is color and mouse highlighting. Anything the mouse highlights
215can be clicked on and is called a button @xref{Mouse Bindings}. 225can be clicked on and is called a button (@pxref{Mouse Bindings}).
216Anything not highlighted by the mouse will not be clickable. 226Anything not highlighted by the mouse will not be clickable.
217 227
218Text in speedbar consists of four different types of data. Knowing how 228Text in speedbar consists of four different types of data. Knowing how
@@ -226,10 +236,10 @@ Groups summarize information in a single line, and provide a high level
226view of more complex systems, like a directory tree, or manual chapters. 236view of more complex systems, like a directory tree, or manual chapters.
227 237
228Groups appear at different indentation levels, and are prefixed with a 238Groups appear at different indentation levels, and are prefixed with a
229@code{+} in some sort of "box". The group name will summarize the 239@samp{+} in some sort of "box". The group name will summarize the
230information within it, and the expansion box will display that 240information within it, and the expansion box will display that
231information inline. In files mode, directories and files are "groups" 241information inline. In File mode, directories and files are "groups"
232where the @code{+} is surrounded by brackets like this: 242where the @samp{+} is surrounded by brackets like this:
233 243
234@example 244@example
235<+> include 245<+> include
@@ -244,48 +254,49 @@ file uses square brackets.
244In all modes, a group can be "edited" by pressing @kbd{RET}, meaning a 254In all modes, a group can be "edited" by pressing @kbd{RET}, meaning a
245file will be opened, or a directory explicitly opened in speedbar. A 255file will be opened, or a directory explicitly opened in speedbar. A
246group can be expanded or contracted using @kbd{+} or 256group can be expanded or contracted using @kbd{+} or
247@kbd{-}. @xref{Basic Keybindings}. 257@kbd{-}. @xref{Basic Keybindings}.
248 258
249Sometimes groups may have a @code{?} in it's indicator box. This means 259Sometimes groups may have a @samp{?} in it's indicator box. This means
250that it is a group type, but there are no contents, or no known way of 260that it is a group type, but there are no contents, or no known way of
251extracting contents of that group. 261extracting contents of that group.
252 262
253When a group has been expanded, the indicator button changes from 263When a group has been expanded, the indicator button changes from
254@code{+} to @code{-}. This indicates that the contents are being shown. 264@samp{+} to @samp{-}. This indicates that the contents are being shown.
255Click the @code{-} button to contract the group, or hide the contents 265Click the @samp{-} button to contract the group, or hide the contents
256currently displayed. 266currently displayed.
257 267
258@subsubsection Tags 268@subsubsection Tags
259@cindex tags 269@cindex tags
260 270
261Tags are the leaf nodes of the tree system. Tags are generally prefixed 271Tags are the leaf nodes of the tree system. Tags are generally prefixed
262with a simple character, such as @code{>}. Tags can only be jumped to using 272with a simple character, such as @samp{>}. Tags can only be jumped to using
263@kbd{RET} or @kbd{e}. 273@kbd{RET} or @kbd{e}.
264 274
265@subsubsection Boolean Flags 275@subsubsection Boolean Flags
266 276
267Sometimes a group or tag is given a boolean flag. These flags appear as 277Sometimes a group or tag is given a boolean flag. These flags appear as
268extra text characters at the end of the line. Files mode uses boolean 278extra text characters at the end of the line. File mode uses boolean
269flags, such as a @code{*} to indicate that a file has been checked out 279flags, such as a @samp{*} to indicate that a file has been checked out
270of a versioning system. 280of a versioning system.
271 281
272For additional flags, 282For additional flags, see
273@c Note to self, update these to sub-nodes which are more relevant. 283@c Note to self, update these to sub-nodes which are more relevant.
274@xref{File Mode}, @xref{Version Control}. 284@ref{File Mode}, and @ref{Version Control}.
275 285
276@subsubsection Unadorned Text 286@subsubsection Unadorned Text
277 287
278Unadorned text generally starts in column 0, without any special symbols 288Unadorned text generally starts in column 0, without any special symbols
279prefixing them. In buffers mode different buffer groups are prefixed 289prefixing them. In Buffers mode different buffer groups are prefixed
280with a description of what the following buffers are (Files, scratch 290with a description of what the following buffers are (Files, scratch
281buffers, and invisible buffers.) 291buffers, and invisible buffers.)
282 292
283Unadorned text will generally be colorless, and not be clickable. 293Unadorned text will generally be colorless, and not clickable.
284 294
285@subsubsection Color Cues 295@subsubsection Color Cues
286 296
287Each type of Group, item indicator, and label is given a different 297Each type of Group, item indicator, and label is given a different
288color. The colors chosen are dependent on a light or dark background. 298color. The colors chosen are dependent on whether the background color
299is light or dark.
289Of important note is that the "current item", which may be a buffer or 300Of important note is that the "current item", which may be a buffer or
290file name, is highlighted red, and underlined. 301file name, is highlighted red, and underlined.
291 302
@@ -305,28 +316,32 @@ entries.
305The mouse has become a common information navigation tool. Speedbar 316The mouse has become a common information navigation tool. Speedbar
306will use the mouse to navigate file systems, buffer lists, and other 317will use the mouse to navigate file systems, buffer lists, and other
307data. The different textual cues provide buttons which can be clicked 318data. The different textual cues provide buttons which can be clicked
308on @xref{Basic Visuals}. Anything that highlights can be clicked on 319on (@pxref{Basic Visuals}). Anything that highlights can be clicked on
309with the mouse, or effected by the menu. 320with the mouse, or effected by the menu.
310 321
311The mouse bindings are: 322The mouse bindings are:
323
312@table @kbd 324@table @kbd
313@item mouse-1 325@item mouse-1
314Move cursor to that location 326Move cursor to that location.
315@item mouse-2, double-mouse-1 327@item mouse-2
316Activate the current button. @kbd{double-mouse-1} is called a "double 328@itemx double-mouse-1
317click" on other platforms, and is useful for windows users with two 329Activate the current button. @kbd{double-mouse-1} is called a @dfn{double
330click} on other platforms, and is useful for windows users with two
318button mice. 331button mice.
319@item SHIFT-mouse-2, SHIFT-double-mouse-1 332@c Isn't it true that with two-button mice, the right button is mouse-2?
333@item S-mouse-2
334@itemx S-double-mouse-1
320@cindex power click 335@cindex power click
321This has the same effect as @kbd{mouse-2}, except it is called a power 336This has the same effect as @kbd{mouse-2}, except it is called a power
322click. This means that if a group with an expansion button @code{+} is 337click. This means that if a group with an expansion button @samp{+} is
323clicked, any caches are flushed, and subitems re-read. If it is a name, 338clicked, any caches are flushed, and subitems re-read. If it is a name,
324it will be opened in a new frame. 339it will be opened in a new frame.
325@item mouse-3 340@item mouse-3
326Activate the speedbar menu. The item selected effects the line clicked, 341Activate the speedbar menu. The item selected effects the line clicked,
327not the line where the cursor was. 342not the line where the cursor was.
328@item mode-line mouse-1 343@item mode-line mouse-1
329Activate the menu. This effects the item the cursor is on before the 344Activate the menu. This affects the item the cursor is on before the
330click, since the mouse was not clicked on anything. 345click, since the mouse was not clicked on anything.
331@item C-mouse-1 346@item C-mouse-1
332Buffers sub-menu. The buffer in the attached frame is switched. 347Buffers sub-menu. The buffer in the attached frame is switched.
@@ -343,11 +358,11 @@ location.
343@cindex displays submenu 358@cindex displays submenu
344 359
345You can display different data by using different display modes. These 360You can display different data by using different display modes. These
346specialized modes make it easier to navigate the relevent pieces of 361specialized modes make it easier to navigate the relevant pieces of
347information, such as files and directories, or buffers. 362information, such as files and directories, or buffers.
348 363
349In the main menu, found by clicking @kbd{mouse-3}, there is a submenu 364In the main menu, found by clicking @kbd{mouse-3}, there is a submenu
350labeled "Displays". This submenu lets you easily choose between 365labeled ``Displays''. This submenu lets you easily choose between
351different display modes. 366different display modes.
352 367
353The contents are modes currently loaded into emacs. By default, this 368The contents are modes currently loaded into emacs. By default, this
@@ -364,7 +379,7 @@ files in the attached frame, or summarize the tags found in files. You
364can even see if a file is checked out of a version control system, or 379can even see if a file is checked out of a version control system, or
365has some associated object file. 380has some associated object file.
366 381
367Advanced behaviors, like copying and renaming files is also provided. 382Advanced behavior, like copying and renaming files, is also provided.
368 383
369@menu 384@menu
370* Directory Display:: What the display means. 385* Directory Display:: What the display means.
@@ -383,16 +398,17 @@ of the parent directories by clicking on the name of the directory you
383wish to jump to. 398wish to jump to.
384 399
385Next, directories are listed. A directory starts with the group 400Next, directories are listed. A directory starts with the group
386indicator button @code{<+>}. Clicking the directory name makes speedbar 401indicator button @samp{<+>}. Clicking the directory name makes speedbar
387load that directory as the root directory for its display. Clicking the 402load that directory as the root directory for its display. Clicking the
388@code{<+>} button will list all directories and files beneath. 403@samp{<+>} button will list all directories and files beneath.
389 404
390Next, files are listed. Files start with the group indicator @code{[+]} 405Next, files are listed. Files start with the group indicator @samp{[+]}
391or @code{[?]}. You can jump to a file in the attached frame by clicking 406or @samp{[?]}. You can jump to a file in the attached frame by clicking
392on the file name. You can expand a file and look at it's tags by 407on the file name. You can expand a file and look at its tags by
393clicking on the @code{[+]} symbol near the file name. 408clicking on the @samp{[+]} symbol near the file name.
394 409
395A typical session might look like this: 410A typical session might look like this:
411
396@example 412@example
397~/lisp/ 413~/lisp/
398<+> checkdoc 414<+> checkdoc
@@ -417,15 +433,17 @@ A typical session might look like this:
417 433
418In this example, you can see several directories. The directory 434In this example, you can see several directories. The directory
419@file{speedbar} has been opened inline. Inside the directory 435@file{speedbar} has been opened inline. Inside the directory
420@file{speedbar}, the file @file{speedbar.el} has it's tags exposed. 436@file{speedbar}, the file @file{speedbar.el} has its tags exposed.
421These tags are extensive, and they are summarized into tag groups. 437These tags are extensive, and they are summarized into tag groups.
422 438
423Files get additional boolean flags associated with them. Valid flags are: 439Files get additional boolean flags associated with them. Valid flags are:
440
424@cindex file flags 441@cindex file flags
425@table @code 442@table @code
426@item * 443@item *
427This file has been checked out of a version control 444This file has been checked out of a version control
428system. @xref{Version Control}. 445system. @xref{Version Control}.
446@cindex @code{speedbar-obj-alist}
429@item # 447@item #
430This file has an up to date object file associated with it. The 448This file has an up to date object file associated with it. The
431variable @code{speedbar-obj-alist} defines how speedbar determines this 449variable @code{speedbar-obj-alist} defines how speedbar determines this
@@ -437,8 +455,8 @@ This file has an out of date object file associated with it.
437A Tag group is prefixed with the symbol @samp{@{+@}}. Clicking this 455A Tag group is prefixed with the symbol @samp{@{+@}}. Clicking this
438symbol will show all symbols that have been organized into that group. 456symbol will show all symbols that have been organized into that group.
439Different types of files have unique tagging methods as defined by their 457Different types of files have unique tagging methods as defined by their
440major mode. Tags are generated with either the @file{imenu} package, or 458major mode. Tags are generated with either the @code{imenu} package, or
441through an @file{etags} interface. 459through the @code{etags} interface.
442 460
443Tag groups are defined in multiple ways which make it easier to find the 461Tag groups are defined in multiple ways which make it easier to find the
444tag you are looking for. Imenu keywords explicitly create groups, and 462tag you are looking for. Imenu keywords explicitly create groups, and
@@ -451,20 +469,20 @@ subgroups @samp{def} and @samp{speedbar-} are groupings where the first
451few characters of the given symbols are specified in the group name. 469few characters of the given symbols are specified in the group name.
452Some group names may say something like @samp{speedbar-t to speedbar-v}, 470Some group names may say something like @samp{speedbar-t to speedbar-v},
453indicating that all symbols which alphabetically fall between those 471indicating that all symbols which alphabetically fall between those
454catagories are included in that sub-group. @xref{Tag Hierarchy Methods}. 472catagories are included in that sub-group. @xref{Tag Hierarchy Methods}.
455 473
456@node Hidden Files, File Keybindings, Directory Display, File Mode 474@node Hidden Files, File Keybindings, Directory Display, File Mode
457@comment node-name, next, previous, up 475@comment node-name, next, previous, up
458@section Hidden Files 476@section Hidden Files
459@cindex hidden files 477@cindex hidden files
460 478
461On unix, a hidden file is a file whose name starts with a period. They 479On Unix, a hidden file is a file whose name starts with a period. They
462are hidden from a regular directory listing because the user is not 480are hidden from a regular directory listing because the user is not
463generally interested in them. 481generally interested in them.
464 482
465In speedbar, a hidden file is a file which isn't very interesting and 483In speedbar, a hidden file is a file which isn't very interesting and
466might prove distracting to the user. Any uninteresting files are 484might prove distracting to the user. Any uninteresting files are
467removed from the File display. There are two levels of interest in 485removed from the File display. There are two levels of uninterest in
468speedbar. The first level of uninterest are files which have no 486speedbar. The first level of uninterest are files which have no
469expansion method, or way of extracting tags. The second level is any 487expansion method, or way of extracting tags. The second level is any
470file that matches the same pattern used for completion in 488file that matches the same pattern used for completion in
@@ -472,12 +490,12 @@ file that matches the same pattern used for completion in
472@code{completion-ignored-extensions}. 490@code{completion-ignored-extensions}.
473 491
474You can toggle the display of uninteresting files from the toggle menu 492You can toggle the display of uninteresting files from the toggle menu
475item "Show All Files". This will display all level one hidden files. 493item @samp{Show All Files}. This will display all level one hidden files.
476These files will be shown with a @code{?} indicator. Level 2 hidden 494These files will be shown with a @samp{?} indicator. Level 2 hidden
477files will still not be shown. 495files will still not be shown.
478 496
479Object files fall into the catagory of level 2 hidden files. You can 497Object files fall into the category of level 2 hidden files. You can
480determine their presense by the @code{#} and @code{!} file indicators 498determine their presence by the @samp{#} and @samp{!} file indicators.
481@xref{Directory Display}. 499@xref{Directory Display}.
482 500
483@node File Keybindings, , Hidden Files, File Mode 501@node File Keybindings, , Hidden Files, File Mode
@@ -485,9 +503,9 @@ determine their presense by the @code{#} and @code{!} file indicators
485@section File Keybindings 503@section File Keybindings
486@cindex file keybindings 504@cindex file keybindings
487 505
488Files mode has keybindings permitting different file system operations 506File mode has keybindings permitting different file system operations
489such as copy or rename. These commands all operate on "the current 507such as copy or rename. These commands all operate on the @dfn{current
490file." In this case, the current file is the file at point, or clicked 508file}. In this case, the current file is the file at point, or clicked
491on when pulling up the menu. 509on when pulling up the menu.
492 510
493@table @kbd 511@table @kbd
@@ -500,8 +518,8 @@ the mouse over an item.
500@item B 518@item B
501Byte compile the Emacs Lisp file on this line. 519Byte compile the Emacs Lisp file on this line.
502@item L 520@item L
503Load the Emacs Lisp file on this line. If an elc file exists, optionally load 521Load the Emacs Lisp file on this line. If a @file{.elc} file exists,
504that. 522optionally load that.
505@item C 523@item C
506Copy the current file to some other location. 524Copy the current file to some other location.
507@item R 525@item R
@@ -515,40 +533,41 @@ Delete the current file's object file. Use the symbols @samp{#} and
515 533
516One menu item toggles the display of all available files. By default, 534One menu item toggles the display of all available files. By default,
517only files which Emacs understands, and knows how to convert into a tag 535only files which Emacs understands, and knows how to convert into a tag
518list. By showing all files, additional files such as text files are 536list, are shown. By showing all files, additional files such as text files are
519also displayed, but they are prefixed with the @samp{[?]} symbol. This 537also displayed, but they are prefixed with the @samp{[?]} symbol. This
520means that it is a file, but that Emacs doesn't know how to expand it. 538means that it is a file, but Emacs doesn't know how to expand it.
521 539
522@node Buffer Mode, Minor Modes, File Mode, Top 540@node Buffer Mode, Minor Modes, File Mode, Top
523@comment node-name, next, previous, up 541@comment node-name, next, previous, up
524@chapter Buffer Mode 542@chapter Buffer Mode
525@cindex buffer mode 543@cindex buffer mode
526 544
527Buffer mode is very similar to file mode, except that instead of 545Buffer mode is very similar to File mode, except that instead of
528tracking the current directory and all files available there, the 546tracking the current directory and all files available there, the
529current list of buffers already loaded into Emacs is shown. 547current list of Emacs buffers is shown.
530 548
531These buffers can have their tags expanded in the same way as files 549These buffers can have their tags expanded in the same way as files,
532and uses the same unknown file indicator @xref{File Mode}. 550and uses the same unknown file indicator (@pxref{File Mode}).
533 551
534Buffers mode does not have file operation bindings, but the following 552Buffer mode does not have file operation bindings, but the following
535buffer specific keybindings are available: 553buffer specific keybindings are available:
554
536@table @kbd 555@table @kbd
537@item k 556@item k
538Kill this buffer. Do not touch it's file. 557Kill this buffer. Do not touch its file.
539@item r 558@item r
540Revert this buffer, reloading from disk. 559Revert this buffer, reloading from disk.
541@end table 560@end table
542 561
543In addition to buffers mode, there is also Quick Buffers mode. In fact, 562In addition to Buffer mode, there is also Quick Buffer mode. In fact,
544Quick Buffers is bound to the @kbd{b} key. The only difference between 563Quick Buffers is bound to the @kbd{b} key. The only difference between
545Buffers and Quick Buffers is that after one operation is is performed 564Buffers and Quick Buffers is that after one operation is performed
546which effects the attached frame, the display is immediately reverted to 565which effects the attached frame, the display is immediately reverted to
547the last displayed mode. 566the last displayed mode.
548 567
549Thus, if you are in Files mode, and you need quick access to a buffer, 568Thus, if you are in File mode, and you need quick access to a buffer,
550press @kbd{b}, click on the buffer you want, and speedbar will revert 569press @kbd{b}, click on the buffer you want, and speedbar will revert
551back to Files mode. 570back to File mode.
552 571
553@node Minor Modes, Customizing, Buffer Mode, Top 572@node Minor Modes, Customizing, Buffer Mode, Top
554@comment node-name, next, previous, up 573@comment node-name, next, previous, up
@@ -584,12 +603,12 @@ showing only this email address in the @samp{To:} field.
584The second section lists all RMAIL folders in the same directory as your 603The second section lists all RMAIL folders in the same directory as your
585main RMAIL folder. The general rule is that RMAIL folders always appear 604main RMAIL folder. The general rule is that RMAIL folders always appear
586in all caps, or numbers. It is possible to save mail in folders with 605in all caps, or numbers. It is possible to save mail in folders with
587lower case letters, but there is no clean way detecting RMAIL folders 606lower case letters, but there is no clean way of detecting such RMAIL folders
588without opening them all. 607without opening them all.
589 608
590Each folder can be visited by clicking the name. You can move mail from 609Each folder can be visited by clicking the name. You can move mail from
591the current RMAIL folder into a different folder by clicking the 610the current RMAIL folder into a different folder by clicking the
592@samp{<M>} button. The M stands for Move. 611@samp{<M>} button. The @samp{M} stands for Move.
593 612
594In this way you can manage your existing RMAIL folders fairly easily 613In this way you can manage your existing RMAIL folders fairly easily
595using the mouse. 614using the mouse.
@@ -615,7 +634,7 @@ a @samp{[+]}, indicating that there are no sub-topics.
615@cindex gdb 634@cindex gdb
616@cindex gud 635@cindex gud
617 636
618If you are debugging an application with GDB in emacs, speedbar can show 637If you are debugging an application with GDB in Emacs, speedbar can show
619you the current stack when the current buffer is the @file{*gdb*} 638you the current stack when the current buffer is the @file{*gdb*}
620buffer. Usually, it will just report that there is no stack, but when 639buffer. Usually, it will just report that there is no stack, but when
621the application is stopped, the current stack will be shown. 640the application is stopped, the current stack will be shown.
@@ -635,7 +654,7 @@ with a stack fetching command.
635 654
636Speedbar is highly customizable, with a plethora of control elements. 655Speedbar is highly customizable, with a plethora of control elements.
637Since speedbar is so visual and reduces so much information, this is an 656Since speedbar is so visual and reduces so much information, this is an
638important aspect of it's behavior. 657important aspect of its behavior.
639 658
640In general, there are three custom groups you can use to quickly modify 659In general, there are three custom groups you can use to quickly modify
641speedbar's behavior. 660speedbar's behavior.
@@ -663,21 +682,27 @@ Customize speedbar's many colors and fonts.
663@cindex frame parameters 682@cindex frame parameters
664 683
665There are several faces speedbar generates to provide a consistent 684There are several faces speedbar generates to provide a consistent
666colorscheme across display types. You can customize these faces using 685color scheme across display types. You can customize these faces using
667your favorite method. They are: 686your favorite method. They are:
668 687
669@table @asis 688@table @asis
689@cindex @code{speedbar-button-face}
670@item speedbar-button-face 690@item speedbar-button-face
671Faced used on expand/contract buttons. 691Face used on expand/contract buttons.
692@cindex @code{speedbar-file-face}
672@item speedbar-file-face 693@item speedbar-file-face
673Face used on Files. Should also be used on non-directory like nodes. 694Face used on Files. Should also be used on non-directory like nodes.
695@cindex @code{speedbar-directory-face}
674@item speedbar-directory-face 696@item speedbar-directory-face
675Face used for directories, or nodes which consist of groups of other nodes. 697Face used for directories, or nodes which consist of groups of other nodes.
698@cindex @code{speedbar-tag-face}
676@item speedbar-tag-face 699@item speedbar-tag-face
677Face used for tags in a file, or leaf items. 700Face used for tags in a file, or for leaf items.
701@cindex @code{speedbar-selected-face}
678@item speedbar-selected-face 702@item speedbar-selected-face
679Face used to highlight the "selected" item. This would be the current 703Face used to highlight the selected item. This would be the current
680file being edited. 704file being edited.
705@cindex @code{speedbar-highlight-face}
681@item speedbar-highlight-face 706@item speedbar-highlight-face
682Face used when the mouse passes over a button. 707Face used when the mouse passes over a button.
683@end table 708@end table
@@ -685,11 +710,13 @@ Face used when the mouse passes over a button.
685You can also customize speedbar's initial frame parameters. How this is 710You can also customize speedbar's initial frame parameters. How this is
686accomplished is dependent on your platform being Emacs or XEmacs. 711accomplished is dependent on your platform being Emacs or XEmacs.
687 712
713@cindex @code{speedbar-frame-parameters}, Emacs
688In Emacs, change the alist @code{speedbar-frame-parameters}. This 714In Emacs, change the alist @code{speedbar-frame-parameters}. This
689variable is used to set up initial details. Height is also 715variable is used to set up initial details. Height is also
690automatically added when speedbar is created, though you can override 716automatically added when speedbar is created, though you can override
691it. 717it.
692 718
719@cindex @code{speedbar-frame-plist}, XEmacs
693In XEmacs, change the plist @code{speedbar-frame-plist}. This is the 720In XEmacs, change the plist @code{speedbar-frame-plist}. This is the
694XEmacs way of doing the same thing. 721XEmacs way of doing the same thing.
695 722
@@ -705,20 +732,25 @@ long list of entries. Imenu (which generates the tag list in Emacs)
705will group some classes of items automatically. Even here, however, 732will group some classes of items automatically. Even here, however,
706some tag groups can be quite large. 733some tag groups can be quite large.
707 734
735@cindex @code{speedbar-tag-hierarchy-method}
708To solve this problem, tags can be grouped into logical units through a 736To solve this problem, tags can be grouped into logical units through a
709hierarchy processor. The specific variable to use is 737hierarchy processor. The specific variable to use is
710@code{speedbar-tag-hierarchy-method}. There are several methods that 738@code{speedbar-tag-hierarchy-method}. There are several methods that
711can be applied in any order. they are: 739can be applied in any order. They are:
712 740
713@table @code 741@table @code
742@cindex @code{speedbar-trim-words-tag-hierarchy}
714@item speedbar-trim-words-tag-hierarchy 743@item speedbar-trim-words-tag-hierarchy
715Find a common prefix for all elements of a group, and trim it off. 744Find a common prefix for all elements of a group, and trim it off.
745@cindex @code{speedbar-prefix-group-tag-hierarchy}
716@item speedbar-prefix-group-tag-hierarchy 746@item speedbar-prefix-group-tag-hierarchy
717If a group is too large, place sets of tags into bins based on common 747If a group is too large, place sets of tags into bins based on common
718prefixes. 748prefixes.
749@cindex @code{speedbar-simple-group-tag-hierarchy}
719@item speedbar-simple-group-tag-hierarchy 750@item speedbar-simple-group-tag-hierarchy
720Take all items in the top level list not in a group, and stick them into 751Take all items in the top level list not in a group, and stick them into
721a `Tags' group. 752a @samp{Tags} group.
753@cindex @code{speedbar-sort-tag-hierarchy}
722@item speedbar-sort-tag-hierarchy 754@item speedbar-sort-tag-hierarchy
723Sort all items, leaving groups on top. 755Sort all items, leaving groups on top.
724@end table 756@end table
@@ -728,8 +760,9 @@ You can also add your own functions to reorganize tags as you see fit.
728Some other control variables are: 760Some other control variables are:
729 761
730@table @code 762@table @code
763@cindex @code{speedbar-tag-group-name-minimum-length}
731@item speedbar-tag-group-name-minimum-length 764@item speedbar-tag-group-name-minimum-length
732Default Value: 4. 765Default value: 4.
733 766
734The minimum length of a prefix group name before expanding. Thus, if 767The minimum length of a prefix group name before expanding. Thus, if
735the @code{speedbar-tag-hierarchy-method} includes 768the @code{speedbar-tag-hierarchy-method} includes
@@ -749,21 +782,22 @@ word
749 782
750This way we won't get silly looking listings. 783This way we won't get silly looking listings.
751 784
785@cindex @code{speedbar-tag-split-minimum-length}
752@item speedbar-tag-split-minimum-length 786@item speedbar-tag-split-minimum-length
753Default value: 20 787Default value: 20.
754 788
755Minimum length before we stop trying to create sub-lists in tags. 789Minimum length before we stop trying to create sub-lists in tags.
756This is used by all tag-hierarchy methods that break large lists into 790This is used by all tag-hierarchy methods that break large lists into
757sub-lists. 791sub-lists.
758 792
793@cindex @code{speedbar-tag-regroup-maximum-length}
759@item speedbar-tag-regroup-maximum-length 794@item speedbar-tag-regroup-maximum-length
760Default value: 10 795Default value: 10.
761 796
762Maximum length of submenus that are regrouped. 797Maximum length of submenus that are regrouped.
763If the regrouping option is used, then if two or more short subgroups 798If the regrouping option is used, then if two or more short subgroups
764are next to each other, then they are combined until this number of 799are next to each other, then they are combined until this number of
765items is reached. 800items is reached.
766
767@end table 801@end table
768 802
769@node Version Control, Hooks, Tag Hierarchy Methods, Customizing 803@node Version Control, Hooks, Tag Hierarchy Methods, Customizing
@@ -772,61 +806,75 @@ items is reached.
772@cindex version control 806@cindex version control
773@cindex vc extensions 807@cindex vc extensions
774 808
775When using the Files mode in speedbar, information regarding a version 809When using the file mode in speedbar, information regarding a version
776control system adds small details to the display. If a file is in a 810control system adds small details to the display. If a file is in a
777version control system, and is "checked out", or "locked" locally, an 811version control system, and is ``checked out'', or ``locked'' locally, an
778asterisk @asis{*} is placed at the end of the file name. In addition, 812asterisk @samp{*} is placed at the end of the file name. In addition,
779the directory name for Version Control systems are left out of the 813the directory name for Version Control systems are left out of the
780speedbar display. 814speedbar display.
781 815
816@cindex @code{speedbar-directory-unshown-regexp}
782You can easily add new version control systems into speedbar's detection 817You can easily add new version control systems into speedbar's detection
783scheme. To make a directory "disappear" from the list, use the variable 818scheme. To make a directory ``disappear'' from the list, use the variable
784@code{speedbar-directory-unshown-regexp}. 819@code{speedbar-directory-unshown-regexp}.
785 820
821@cindex @code{speedbar-vc-path-enable-hook}
786Next, you need to write entries for two hooks. The first is 822Next, you need to write entries for two hooks. The first is
787@code{speedbar-vc-path-enable-hook} which will enable a VC check in the 823@code{speedbar-vc-path-enable-hook} which will enable a VC check in the
788current directory for the group of files being checked. Your hook 824current directory for the group of files being checked. Your hook
789function should take one parameter (the directory to check) and return 825function should take one parameter (the directory to check) and return
790@code{t} if your VC method is in control here. 826@code{t} if your VC method is in control here.
791 827
828@cindex @code{speedbar-vc-in-control-hook}
792The second function is @code{speedbar-vc-in-control-hook}. This hook 829The second function is @code{speedbar-vc-in-control-hook}. This hook
793takes two parameters. The @var{PATH} of the file to check, plus the 830takes two parameters, the @var{path} of the file to check, and the
794@var{FILE} name. Return @code{t} if you want to have the asterisk 831@var{file} name. Return @code{t} if you want to have the asterisk
795placed near this file. 832placed near this file.
796 833
834@cindex @code{speedbar-vc-indicator}
797Lastly, you can change the VC indicator using the variable 835Lastly, you can change the VC indicator using the variable
798@code{speedbar-vc-indicator}, and specify a single character string. 836@code{speedbar-vc-indicator}, and specify a single character string.
799 837
800@node Hooks, , Version Control, Customizing 838@node Hooks, , Version Control, Customizing
801@comment node-name, next, previous, up 839@comment node-name, next, previous, up
802@section Hooks 840@section Hooks
841@cindex hooks
803 842
804There are several hooks in speedbar allowing custom behaviors to be 843There are several hooks in speedbar allowing custom behaviors to be
805added. Available hooks are: 844added. Available hooks are:
806 845
807@table @code 846@table @code
847@cindex @code{speedbar-visiting-file-hook}
808@item speedbar-visiting-file-hook 848@item speedbar-visiting-file-hook
809Hooks run when speedbar visits a file in the selected frame. 849Hooks run when speedbar visits a file in the selected frame.
850@cindex @code{speedbar-visiting-tag-hook}
810@item speedbar-visiting-tag-hook 851@item speedbar-visiting-tag-hook
811Hooks run when speedbar visits a tag in the selected frame. 852Hooks run when speedbar visits a tag in the selected frame.
853@cindex @code{speedbar-load-hook}
812@item speedbar-load-hook 854@item speedbar-load-hook
813Hooks run when speedbar is loaded. 855Hooks run when speedbar is loaded.
856@cindex @code{speedbar-reconfigure-keymaps-hook}
814@item speedbar-reconfigure-keymaps-hook 857@item speedbar-reconfigure-keymaps-hook
815Hooks run when the keymaps are regenerated. Keymaps are reconfigured 858Hooks run when the keymaps are regenerated. Keymaps are reconfigured
816whenever modes change. This will let you add custom keybindings. 859whenever modes change. This will let you add custom keybindings.
860@cindex @code{speedbar-before-popup-hook}
817@item speedbar-before-popup-hook 861@item speedbar-before-popup-hook
818Hooks called before popping up the speedbar frame. 862Hooks called before popping up the speedbar frame.
819New frames are often popped up when "power clicking" on an item to view 863New frames are often popped up when ``power clicking'' on an item to view
820it. 864it.
865@cindex @code{speedbar-before-delete-hook}
821@item speedbar-before-delete-hook 866@item speedbar-before-delete-hook
822Hooks called before deleting or hiding the speedbar frame. 867Hooks called before deleting or hiding the speedbar frame.
868@cindex @code{speedbar-mode-hook}
823@item speedbar-mode-hook 869@item speedbar-mode-hook
824Hooks called after creating a speedbar buffer. 870Hooks called after creating a speedbar buffer.
871@cindex @code{speedbar-timer-hook}
825@item speedbar-timer-hook 872@item speedbar-timer-hook
826Hooks called after running the speedbar timer function. 873Hooks called after running the speedbar timer function.
874@cindex @code{speedbar-scanner-reset-hook}
827@item speedbar-scanner-reset-hook 875@item speedbar-scanner-reset-hook
828Hook called whenever generic scanners are reset. 876Hook called whenever generic scanners are reset.
829Set this to implement your own scanning / rescan safe functions with 877Set this to implement your own scanning or rescan safe functions with
830state data. 878state data.
831@end table 879@end table
832 880
@@ -836,14 +884,14 @@ state data.
836@cindex extending 884@cindex extending
837 885
838Speedbar can run different types of Major display modes such as Files 886Speedbar can run different types of Major display modes such as Files
839@xref{File Mode}, and Buffers @xref{Buffer Mode}. It can also manage 887(@pxref{File Mode}), and Buffers (@pxref{Buffer Mode}). It can also manage
840different minor display modes for use with buffers handling specialized 888different minor display modes for use with buffers handling specialized
841data. 889data.
842 890
843These major and minor display modes are handled through an extension 891These major and minor display modes are handled through an extension
844system which permits specialized keymaps and menu extensions, in 892system which permits specialized keymaps and menu extensions, in
845addition to a unique rendering function. You can also specify a wide 893addition to a unique rendering function. You can also specify a wide
846range of tagging functions. The default uses @file{imenu}, but new 894range of tagging functions. The default uses @code{imenu}, but new
847tagginging methods can be easilly added. In this chapter, you will 895tagginging methods can be easilly added. In this chapter, you will
848learn how to write your own major or minor display modes, and how to 896learn how to write your own major or minor display modes, and how to
849create specialized tagging functions. 897create specialized tagging functions.
@@ -859,7 +907,7 @@ create specialized tagging functions.
859@section Minor Display Modes 907@section Minor Display Modes
860@cindex create minor display mode 908@cindex create minor display mode
861 909
862A minor display mode is a mode useful when using a specific type of 910A @dfn{minor display mode} is a mode useful when using a specific type of
863buffer. This mode might not be useful for any other kind of data or 911buffer. This mode might not be useful for any other kind of data or
864mode, or may just be more useful that a files or buffers based mode when 912mode, or may just be more useful that a files or buffers based mode when
865working with a specialized mode. 913working with a specialized mode.
@@ -869,50 +917,58 @@ These modes display information specific to the major mode shown in the
869attached frame. 917attached frame.
870 918
871To enable a minor display mode in your favorite Major mode, follow these 919To enable a minor display mode in your favorite Major mode, follow these
872steps. The string @samp{<name>} is the name of the major mode being 920steps. The string @samp{@var{name}} is the name of the major mode being
873augmented with speedbar. 921augmented with speedbar.
874 922
875@enumerate 923@enumerate
876@item 924@item
877Create the keymap variable @code{<name>-speedbar-key-map}. 925Create the keymap variable @code{@var{name}-speedbar-key-map}.
926
878@item 927@item
879Create a function named whatever you like which assigns values into your 928Create a function, named whatever you like, which assigns values into your
880keymap. Use this command to create the keymap before assigning 929keymap. Use this command to create the keymap before assigning
881bindings: 930bindings:
882@example 931
883 (setq <name>-speedbar-key-map (speedbar-make-specialized-keymap)) 932@smallexample
884@end example 933 (setq @var{name}-speedbar-key-map (speedbar-make-specialized-keymap))
934@end smallexample
935
885This function creates a special keymap for use in speedbar. 936This function creates a special keymap for use in speedbar.
937
886@item 938@item
887Call your install function, or assign it to a hook like this: 939Call your install function, or assign it to a hook like this:
888@example 940
941@smallexample
889(if (featurep 'speedbar) 942(if (featurep 'speedbar)
890 (<name>-install-speedbar-variables) 943 (@var{name}-install-speedbar-variables)
891 (add-hook 'speedbar-load-hook '<name>-install-speedbar-variables)) 944 (add-hook 'speedbar-load-hook '@var{name}-install-speedbar-variables))
892@end example 945@end smallexample
946
893@item 947@item
894Create an easymenu compatible vector named @code{<name>-speedbar-menu-items}. 948Create an easymenu compatible vector named
895This will be spliced into speedbar's control menu. 949@code{@var{name}-speedbar-menu-items}. This will be spliced into
950speedbar's control menu.
951
896@item 952@item
897Create a function called @code{<name>-speedbar-buttons}. This function 953Create a function called @code{@var{name}-speedbar-buttons}. This function
898should take one variable, which is the buffer for which it will create 954should take one variable, which is the buffer for which it will create
899buttons. At this time @code{(current-buffer)} will point to the 955buttons. At this time @code{(current-buffer)} will point to the
900uncleared speedbar buffer. 956uncleared speedbar buffer.
901@end enumerate 957@end enumerate
902 958
903When writing @code{<name>-speedbar-buttons}, the first thing you will 959When writing @code{@var{name}-speedbar-buttons}, the first thing you will
904want to do is execute a check to see if you need to re-create your 960want to do is execute a check to see if you need to re-create your
905display. If it needs to be cleared, you need to erase the speedbar 961display. If it needs to be cleared, you need to erase the speedbar
906buffer yourself, and start drawing buttons. @xref{Creating a display}. 962buffer yourself, and start drawing buttons. @xref{Creating a display}.
907 963
908@node Major Display Modes, Tagging Extentions, Minor Display Modes, Extending 964@node Major Display Modes, Tagging Extentions, Minor Display Modes, Extending
909@section Major Display Modes 965@section Major Display Modes
910@cindex create major display mode 966@cindex create major display mode
911 967
912Creating a Major Display Mode for speedbar requires authoring a keymap, 968Creating a @dfn{Major Display Mode} for speedbar requires authoring a keymap,
913an easy-menu segment, and writing several functions. These items can be 969an easy-menu segment, and writing several functions. These items can be
914given any name, and are made the same way as in a minor display mode 970given any name, and are made the same way as in a minor display mode
915@xref{Minor Display Modes}. Once this is done, these items need to be 971(@pxref{Minor Display Modes}). Once this is done, these items need to be
916registered. 972registered.
917 973
918Because this setup activity may or may not have speedbar available when 974Because this setup activity may or may not have speedbar available when
@@ -920,21 +976,26 @@ it is being loaded, it is necessary to create an install function. This
920function should create and initialize the keymap, and add your 976function should create and initialize the keymap, and add your
921expansions into the customization tables. 977expansions into the customization tables.
922 978
979@cindex @code{speedbar-make-specialized-keymap}
923When creating the keymap, use the function 980When creating the keymap, use the function
924@code{speedbar-make-specialized-keymap} instead of other keymap making 981@code{speedbar-make-specialized-keymap} instead of other keymap making
925functions. This will provide you with the initial bindings needed. 982functions. This will provide you with the initial bindings needed.
926Some common speedbar functions you might want to bind are: 983Some common speedbar functions you might want to bind are:
927 984
928@table @code 985@table @code
986@cindex @code{speedbar-edit-line}
929@item speedbar-edit-line 987@item speedbar-edit-line
930Edit the item on the current line. 988Edit the item on the current line.
989@cindex @code{speedbar-expand-line}
931@item speedbar-expand-line 990@item speedbar-expand-line
932Expand the item under the cursor. 991Expand the item under the cursor.
933With universal argument @key{C-u}, flush cached data before expanding. 992With a numeric argument (@kbd{C-u}), flush cached data before expanding.
993@cindex @code{speedbar-contract-line}
934@item speedbar-contract-line 994@item speedbar-contract-line
935Contract the item under the cursor. 995Contract the item under the cursor.
936@end table 996@end table
937 997
998@cindex @code{speedbar-line-path}
938These function require that function @code{speedbar-line-path} be 999These function require that function @code{speedbar-line-path} be
939correctly overloaded to work. 1000correctly overloaded to work.
940 1001
@@ -988,6 +1049,7 @@ it is not provided, you can derive it like this:
988 (setq depth (string-to-int (match-string 1))))) 1049 (setq depth (string-to-int (match-string 1)))))
989@end example 1050@end example
990 1051
1052@noindent
991where the depth is stored as invisible text at the beginning of each 1053where the depth is stored as invisible text at the beginning of each
992line. 1054line.
993 1055
@@ -997,6 +1059,7 @@ that tag should be returned. This is critical for built in file based
997functions to work (meaning less code for you to write). If your display 1059functions to work (meaning less code for you to write). If your display
998does not deal in files, you do not need to overload this function. 1060does not deal in files, you do not need to overload this function.
999 1061
1062@cindex @code{speedbar-item-info}
1000The function @code{speedbar-item-info}, however, is very likely to need 1063The function @code{speedbar-item-info}, however, is very likely to need
1001overloading. This function takes no parameters and must derive a text 1064overloading. This function takes no parameters and must derive a text
1002summary to display in the minibuffer. 1065summary to display in the minibuffer.
@@ -1006,34 +1069,38 @@ built in tagging. These functions can be @code{or}ed since each one
1006returns non-nil if it displays a message. They are: 1069returns non-nil if it displays a message. They are:
1007 1070
1008@table @code 1071@table @code
1072@cindex @code{speedbar-item-info-file-helper}
1009@item speedbar-item-info-file-helper 1073@item speedbar-item-info-file-helper
1010This takes an optional FILENAME parameter. You can derive your own 1074This takes an optional @var{filename} parameter. You can derive your own
1011filename, or it will derive it using a (possibly overloaded) function 1075filename, or it will derive it using a (possibly overloaded) function
1012@code{speedbar-line-file}. It shows details about a file. 1076@code{speedbar-line-file}. It shows details about a file.
1077@cindex @code{speedbar-item-info-tag-helper}
1013@item speedbar-item-info-tag-helper 1078@item speedbar-item-info-tag-helper
1014If the current line is a tag, then display information about that tag, 1079If the current line is a tag, then display information about that tag,
1015such as it's parent file, and location. 1080such as its parent file, and location.
1016@end table 1081@end table
1017 1082
1018Your custom function might look like this: 1083Your custom function might look like this:
1019 1084
1085@example
1020(defun MyExtension-item-info () 1086(defun MyExtension-item-info ()
1021 "Display information about the current line." 1087 "Display information about the current line."
1022 (or (speedbar-item-info-tag-helper) 1088 (or (speedbar-item-info-tag-helper)
1023 (message "Interesting detail."))) 1089 (message "Interesting detail.")))
1090@end example
1024 1091
1025Once you have done all this, speedbar will show an entry in the 1092Once you have done all this, speedbar will show an entry in the
1026Displays menu declaring that your extension is available. 1093@samp{Displays} menu declaring that your extension is available.
1027 1094
1028@node Tagging Extentions, Creating a display, Major Display Modes, Extending 1095@node Tagging Extentions, Creating a display, Major Display Modes, Extending
1029@section Tagging Extentions 1096@section Tagging Extentions
1030 1097
1031It is possible to create new methods for tagging files in speedbar. 1098It is possible to create new methods for tagging files in speedbar.
1032To do this, you need two basic functions. One function will fetch the 1099To do this, you need two basic functions, one function to fetch the
1033tags from a buffer, and the second will insert them below the filename. 1100tags from a buffer, the other to insert them below the filename.
1034 1101
1035@defun my-fetch-dynamic-tags file 1102@defun my-fetch-dynamic-tags file
1036Parse @var{file} for a list of tags. Return the list, or t if there was 1103Parse @var{file} for a list of tags. Return the list, or @code{t} if there was
1037an error. 1104an error.
1038@end defun 1105@end defun
1039 1106
@@ -1046,10 +1113,12 @@ Insert a list of tags @var{lst} started at indentation level
1046display information requried. 1113display information requried.
1047@end defun 1114@end defun
1048 1115
1116@cindex @code{speedbar-create-tag-hierarchy}
1049It is often useful to use @code{speedbar-create-tag-hierarchy} on your 1117It is often useful to use @code{speedbar-create-tag-hierarchy} on your
1050token list. See that functions documentation for details on what it 1118token list. See that function's documentation for details on what it
1051requires. 1119requires.
1052 1120
1121@cindex @code{speedbar-dynamic-tags-function-list}
1053Once these two functions are written, modify the variable 1122Once these two functions are written, modify the variable
1054@code{speedbar-dynamic-tags-function-list} to include your parser at the 1123@code{speedbar-dynamic-tags-function-list} to include your parser at the
1055beginning, like this: 1124beginning, like this:
@@ -1061,14 +1130,14 @@ beginning, like this:
1061 1130
1062If your parser is only good for a few types of files, make sure that it 1131If your parser is only good for a few types of files, make sure that it
1063is either a buffer local modification, or that the tag generator returns 1132is either a buffer local modification, or that the tag generator returns
1064t for non valid buffers. 1133@code{t} for non valid buffers.
1065 1134
1066@node Creating a display, , Tagging Extentions, Extending 1135@node Creating a display, , Tagging Extentions, Extending
1067@section Creating a display 1136@section Creating a display
1068@cindex creating a display 1137@cindex creating a display
1069 1138
1070Rendering a display in speedbar is completely flexible. When your 1139Rendering a display in speedbar is completely flexible. When your
1071button function is called, @xref{Minor Display Modes}, @xref{Major 1140button function is called, see @ref{Minor Display Modes}, and @ref{Major
1072Display Modes}, you have control to @code{insert} anything you want. 1141Display Modes}, you have control to @code{insert} anything you want.
1073 1142
1074The conventions allow almost anything to be inserted, but several helper 1143The conventions allow almost anything to be inserted, but several helper
@@ -1088,7 +1157,7 @@ depth which indicates how far down the tree it is. This information is
1088stored in invisible text at the beginning of each line, and is used by 1157stored in invisible text at the beginning of each line, and is used by
1089the navigation commands. 1158the navigation commands.
1090 1159
1091@defun speedbar-insert-button text face mouse function @@optional token prevline 1160@defun speedbar-insert-button text face mouse function &optional token prevline
1092This function inserts one button into the current location. 1161This function inserts one button into the current location.
1093@var{text} is the text to insert. @var{face} is the face in which it 1162@var{text} is the text to insert. @var{face} is the face in which it
1094will be displayed. @var{mouse} is the face to display over the text 1163will be displayed. @var{mouse} is the face to display over the text
@@ -1105,7 +1174,8 @@ the next line.
1105 1174
1106Create a tag line with @var{exp-button-type} for the small expansion 1175Create a tag line with @var{exp-button-type} for the small expansion
1107button. This is the button that expands or contracts a node (if 1176button. This is the button that expands or contracts a node (if
1108applicable), and @var{exp-button-char} the character in it (+, -, ?, 1177applicable), and @var{exp-button-char} the character in it (@samp{+},
1178@samp{-}, @samp{?},
1109etc). @var{exp-button-function} is the function to call if it's clicked 1179etc). @var{exp-button-function} is the function to call if it's clicked
1110on. Button types are @code{'bracket}, @code{'angle}, @code{'curly}, 1180on. Button types are @code{'bracket}, @code{'angle}, @code{'curly},
1111@code{'expandtag}, @code{'statictag}, or nil. @var{exp-button-data} is 1181@code{'expandtag}, @code{'statictag}, or nil. @var{exp-button-data} is
@@ -1125,21 +1195,22 @@ position to insert a new item, and that the new item will end with a CR
1125 1195
1126@defun speedbar-insert-generic-list level list expand-fun find-fun 1196@defun speedbar-insert-generic-list level list expand-fun find-fun
1127 1197
1128At @var{LEVEL}, (the current indentation level desired) insert a generic 1198At @var{level}, (the current indentation level desired) insert a generic
1129multi-level alist @var{list}. Associations with lists get @samp{@{+@}} 1199multi-level alist @var{list}. Associations with lists get @samp{@{+@}}
1130tags (to expand into more nodes) and those with positions or other data 1200tags (to expand into more nodes) and those with positions or other data
1131just get a > as the indicator. @samp{@{+@}} buttons will have the 1201just get a @samp{>} as the indicator. @samp{@{+@}} buttons will have the
1132function @var{expand-fun} and the token is the @code{cdr} list. The 1202function @var{expand-fun} and the token is the @code{cdr} list. The
1133token name will have the function @var{find-fun} and not token. 1203token name will have the function @var{find-fun} and not token.
1134 1204
1135Each element of the list can have one of these forms: 1205Each element of the list can have one of these forms:
1206
1136@table @code 1207@table @code
1137@item ("name" . marker-or-number) 1208@item (@var{name} . marker-or-number)
1138one tag at this level 1209One tag at this level.
1139@item ("name" ("name" . marker-or-number) ("name" . marker-or-number) ... ) 1210@item (@var{name} (@var{name} . marker-or-number) (@var{name} . marker-or-number) ... )
1140One group of tags 1211One group of tags.
1141@item ("name" marker-or-number ("name" . marker-or-number) ... ) 1212@item (@var{name} marker-or-number (@var{name} . marker-or-number) ... )
1142One Group of tags where the group has a starting position 1213One Group of tags where the group has a starting position.
1143@end table 1214@end table
1144 1215
1145When you use @code{speedbar-insert-generic-list}, there are some 1216When you use @code{speedbar-insert-generic-list}, there are some
@@ -1148,7 +1219,7 @@ obvious is @code{speedbar-tag-hierarchy-method}.
1148@xref{Tag Hierarchy Methods}. 1219@xref{Tag Hierarchy Methods}.
1149 1220
1150@defvar speedbar-generic-list-group-expand-button-type 1221@defvar speedbar-generic-list-group-expand-button-type
1151This is the button type used for groups of tags, weather expanded, 1222This is the button type used for groups of tags, whether expanded
1152or added in via a hierarchy method. Two good values are 1223or added in via a hierarchy method. Two good values are
1153@code{'curly} and @code{'expandtag}. Curly is the default button, and 1224@code{'curly} and @code{'expandtag}. Curly is the default button, and
1154@code{'expandtag} is useful if the groups also has a position. 1225@code{'expandtag} is useful if the groups also has a position.
@@ -1168,9 +1239,6 @@ Two good values are @code{nil} and @code{'statictag}.
1168@unnumbered Concept Index 1239@unnumbered Concept Index
1169@printindex cp 1240@printindex cp
1170 1241
1171@unnumbered Function Index
1172@printindex fn
1173
1174@bye 1242@bye
1175@c LocalWords: speedbar's xref Keybindings slowbar kbd subsubsection 1243@c LocalWords: speedbar's xref Keybindings slowbar kbd subsubsection
1176@c LocalWords: keybindings 1244@c LocalWords: keybindings