;;; semantic/decorate/mode.el --- Minor mode for decorating tags
-;; Copyright (C) 2000-2005, 2007-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2005, 2007-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
'semantic-decorate-tags-after-full-reparse nil t)
;; Add decorations to available tags. The above hooks ensure
;; that new tags will be decorated when they become available.
- (semantic-decorate-add-decorations (semantic-fetch-available-tags)))
+ ;; However, don't do this immediately, because EDE will be
+ ;; activated later by find-file-hook, and includes might not
+ ;; be found yet.
+ (run-with-idle-timer
+ 0.1 nil
+ (lambda ()
+ (semantic-decorate-add-decorations (semantic-fetch-available-tags)))))
;; Remove decorations from available tags.
(semantic-decorate-clear-decorations (semantic-fetch-available-tags))
;; Cleanup any leftover crap too.
"Define a new decoration style with NAME.
DOC is a documentation string describing the decoration style NAME.
It is appended to auto-generated doc strings.
-An Optional list of FLAGS can also be specified. Flags are:
+An optional list of FLAGS can also be specified. Flags are:
:enabled <value> - specify the default enabled value for NAME.
:load <value> - specify a feature (as a string) with the rest of
the definition for decoration mode NAME.
(let ((predicate (semantic-decorate-style-predicate name))
(highlighter (semantic-decorate-style-highlighter name))
(predicatedef (semantic-decorate-style-predicate-default name))
- (highlighterdef (semantic-decorate-style-highlighter-default name))
+ (highlighterdef (semantic-decorate-style-highlighter-default name))
(defaultenable (if (plist-member flags :enabled)
(plist-get flags :enabled)
t))
(add-to-list 'semantic-decoration-styles
(cons ',(symbol-name name)
,defaultenable))
- ;; If there is a load file, then create the autload tokens for
+ ;; If there is a load file, then create the autoload tokens for
;; those functions to load the token, but only if the fsym
;; doesn't exist yet.
(when (stringp ,loadfile)
(unless (fboundp ',predicatedef)
(autoload ',predicatedef ',loadfile "Return non-nil to decorate TAG."
- nil 'function))
-
+ ))
+
(unless (fboundp ',highlighterdef)
- (autoload ',highlighterdef ',loadfile "Decorate TAG."
- nil 'function))
+ (autoload ',highlighterdef ',loadfile "Decorate TAG."))
))
))
\f
;;; Decoration Modes in other files
;;
+(declare-function semantic-decoration-on-includes-p-default
+ "semantic/decorate/include")
+(declare-function semantic-decoration-on-includes-highlight-default
+ "semantic/decorate/include")
(define-semantic-decoration-style semantic-decoration-on-includes
"Highlight class members that are includes.
This mode provides a nice context menu on the include statements."