]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/semantic/sb.el
Remove obsolete leading * from defcustom, defface doc strings.
[gnu-emacs] / lisp / cedet / semantic / sb.el
index 88b0cc33d431c7d928260534e9021c5f12784b27..a06955067d9e0f27b43d504e18c992beb51337f6 100644 (file)
@@ -1,6 +1,6 @@
 ;;; semantic/sb.el --- Semantic tag display for speedbar
 
-;; Copyright (C) 1999-201 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2016 Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 ;; Keywords: syntax
 (declare-function semanticdb-file-stream "semantic/db")
 
 (defcustom semantic-sb-autoexpand-length 1
-  "*Length of a semantic bucket to autoexpand in place.
+  "Length of a semantic bucket to autoexpand in place.
 This will replace the named bucket that would have usually occurred here."
   :group 'speedbar
   :type 'integer)
 
+(defvar semantic-sb-filter-tags-of-class '(code)
+  "Tags classes to not display in speedbar.
+Make this buffer local for modes that have different types of tags
+that should be ignored.")
+
 (defcustom semantic-sb-button-format-tag-function 'semantic-format-tag-abbreviate
-  "*Function called to create the text for a but from a token."
+  "Function called to create the text for a but from a token."
   :group 'speedbar
   :type semantic-format-tag-custom-list)
 
 (defcustom semantic-sb-info-format-tag-function 'semantic-format-tag-summarize
-  "*Function called to create the text for info display from a token."
+  "Function called to create the text for info display from a token."
   :group 'speedbar
   :type semantic-format-tag-custom-list)
 
@@ -87,7 +92,7 @@ Restore the old current buffer when completed."
 ;;    @ type
 ;;    = default value
 ;;
-;;  +> keywrd Type
+;;  +> keyword Type
 ;;   +> type part
 ;;
 ;;  +>  -> click to see additional information
@@ -313,12 +318,12 @@ TEXT TOKEN and INDENT are the details."
     (save-excursion (speedbar-stealthy-updates))
     (semantic-go-to-tag token parent)
     (switch-to-buffer (current-buffer))
-    ;; Reset the timer with a new timeout when cliking a file
+    ;; Reset the timer with a new timeout when clicking a file
     ;; in case the user was navigating directories, we can cancel
     ;; that other timer.
     ;; (speedbar-set-timer dframe-update-speed)
     ;;(recenter)
-    (speedbar-maybee-jump-to-attached-frame)
+    (dframe-maybee-jump-to-attached-frame)
     (run-hooks 'speedbar-visiting-tag-hook)))
 
 (defun semantic-sb-expand-group (text token indent)
@@ -399,13 +404,18 @@ Returns the tag list, or t for an error."
     (if (listp out)
        (condition-case nil
            (progn
-             ;; This brings externally defind methods into
+             ;; This brings externally defined methods into
              ;; their classes, and creates meta classes for
              ;; orphans.
              (setq out (semantic-adopt-external-members out))
              ;; Dump all the tokens into buckets.
              (semantic-sb-with-tag-buffer (car out)
-               (semantic-bucketize out)))
+               (semantic-bucketize out nil
+                                   (lambda (tagsin)
+                                     ;; Remove all boring tags.
+                                     (semantic-filter-tags-by-class
+                                      semantic-sb-filter-tags-of-class
+                                      tagsin)))))
          (error t))
       t)))
 
@@ -415,4 +425,8 @@ Returns the tag list, or t for an error."
 
 (provide 'semantic/sb)
 
+;; Local variables:
+;; generated-autoload-load-name: "semantic/sb"
+;; End:
+
 ;;; semantic/sb.el ends here