;;; semantic/sb.el --- Semantic tag display for speedbar
-;; Copyright (C) 1999-2011 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)
;; @ type
;; = default value
;;
-;; +> keywrd Type
+;; +> keyword Type
;; +> type part
;;
;; +> -> click to see additional information
(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)
(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)))
(provide 'semantic/sb)
+;; Local variables:
+;; generated-autoload-load-name: "semantic/sb"
+;; End:
+
;;; semantic/sb.el ends here