]> code.delx.au - gnu-emacs/blobdiff - lisp/speedbar.el
(save-abbrevs, save-some-buffers): Don't ask the user
[gnu-emacs] / lisp / speedbar.el
index a880e5713209ab604080c230465737ee7f634558..d60d38a8275f144e9dd0f11e498a7535e55b2edf 100644 (file)
@@ -1,4 +1,4 @@
-;;; speedbar --- quick access to files and tags in a frame
+;;; speedbar.el --- quick access to files and tags in a frame
 
 ;;; Copyright (C) 1996, 97, 98, 99, 2000, 01 Free Software Foundation
 
 ;; applicable, tags in the active file can be expanded.
 ;;
 ;;   To add new supported files types into speedbar, use the function
-;; `speedbar-add-supported-extension' If speedbar complains that the
+;; `speedbar-add-supported-extension' If speedbar complains that the
 ;; file type is not supported, that means there is no built in
 ;; support from imenu, and the etags part wasn't set up correctly.  You
 ;; may add elements to `speedbar-supported-extension-expressions' as long
 ;; as it is done before speedbar is loaded.
 ;;
 ;;   To prevent speedbar from following you into certain directories
-;; use the function `speedbar-add-ignored-path-regexp' too add a new
+;; use the function `speedbar-add-ignored-path-regexp' to add a new
 ;; regular expression matching a type of path.  You may add list
 ;; elements to `speedbar-ignored-path-expressions' as long as it is
 ;; done before speedbar is loaded.
@@ -90,9 +90,9 @@
 ;; which controls how tags are layed out.  It is actually a list of
 ;; functions that filter the data.  The default groups large tag lists
 ;; into sub-lists.  A long flat list can be used instead if needed.
-;; Other filters could be easily added.
+;; Other filters can be easily added.
 ;;
-;;    AUC-TEX users: The imenu tags for AUC-TEX mode don't work very
+;;    AUC-TEX users: The imenu tags for AUC-TEX mode doesn't work very
 ;; well.  Use the imenu keywords from tex-mode.el for better results.
 ;;
 ;; This file requires the library package assoc (association lists)
 ;; Adding a speedbar specialized display mode:
 ;;
 ;; Speedbar can be configured to create a special display for certain
-;; modes that do not display tradition file/tag data.  Rmail, Info,
+;; modes that do not display traditional file/tag data.  Rmail, Info,
 ;; and the debugger are examples.  These modes can, however, benefit
 ;; from a speedbar style display in their own way.
 ;;
 ;; `speedbar-insert-generic-list'.  If you use
 ;; `speedbar-insert-generic-list', also read the doc for
 ;; `speedbar-tag-hierarchy-method' in case you wish to override it.
-;; The function `speedbar-with-attached-buffer' brings you back to the
+;; The macro `speedbar-with-attached-buffer' brings you back to the
 ;; buffer speedbar is displaying for.
 ;;
 ;; For those functions that make buttons, the "function" should be a
 ;; functions are `speedbar-change-expand-button-char',
 ;; `speedbar-delete-subblock', and `speedbar-center-buffer-smartly'.
 ;; The variable `speedbar-power-click' is set to t in your functions
-;; when the user shift-clicks.  This indications anything from
+;; when the user shift-clicks.  This is an indication of anything from
 ;; refreshing cached data to making a buffer appear in a new frame.
 ;;
 ;; If you wish to add to the default speedbar menu for the case of
 ;; splice in.  KEYMAP is a symbol holding the keymap to use, and
 ;; BUTTON-FUNCTIONS are the function names to call, in order, to create
 ;; the display.
-;;  Another tweekable variable is `speedbar-stealthy-function-list'
+;;  Another tweakable variable is `speedbar-stealthy-function-list'
 ;; which is of the form (NAME &rest FUNCTION ...).  NAME is the string
 ;; name matching `speedbar-add-expansion-list'.  (It does not need to
 ;; exist.). This provides additional display info which might be
 ;; time-consuming to calculate.
 ;;  Lastly, `speedbar-mode-functions-list' allows you to set special
-;; function overrides.  At the moment very few functions are
-;; over ridable, but more will be added as the need is discovered.
+;; function overrides.  At the moment very few functions may be
+;; overridden, but more will be added as the need is discovered.
 
 ;;; TODO:
 ;; - More functions to create buttons and options
@@ -671,7 +671,7 @@ It is generated from the variable `completion-ignored-extensions'")
   (append '(".[ch]\\(\\+\\+\\|pp\\|c\\|h\\|xx\\)?" ".tex\\(i\\(nfo\\)?\\)?"
            ".el" ".emacs" ".l" ".lsp" ".p" ".java" ".f\\(90\\|77\\|or\\)?")
          (if speedbar-use-imenu-flag
-             '(".ada" ".p[lm]" ".tcl" ".m" ".scm" ".pm" ".py"
+             '(".ada" ".p[lm]" ".tcl" ".m" ".scm" ".pm" ".py" ".g"
                ;; html is not supported by default, but an imenu tags package
                ;; is available.  Also, html files are nice to be able to see.
                ".s?html"
@@ -1277,7 +1277,6 @@ in the selected file.
                               (speedbar-quick-mouse event)))
                        ;; Don't do normal operations.
                        t)))))
-    (make-local-hook 'kill-buffer-hook)
     (add-hook 'kill-buffer-hook (lambda () (let ((skilling (boundp 'skilling)))
                                             (if skilling
                                                 nil
@@ -2874,7 +2873,7 @@ If new functions are added, their state needs to be updated here."
   (goto-char (point-min))
   (let ((m nil))
     (while (and (setq m (re-search-forward
-                        (concat " \\(" (file-name-nondirectory file)
+                        (concat " \\(" (regexp-quote (file-name-nondirectory file))
                                 "\\)\\(" speedbar-indicator-regex "\\)?\n")
                         nil t))
                (not (string= file
@@ -4337,7 +4336,8 @@ If we have an image associated with it, use that image."
            (def-edebug-spec speedbar-with-writable def-body)))
 
 (provide 'speedbar)
-;;; speedbar ends here
 
 ;; run load-time hooks
 (run-hooks 'speedbar-load-hook)
+
+;;; speedbar.el ends here