;; For the semantic-find-tags-by-name macro.
(eval-when-compile (require 'semantic/find))
-(declare-function semanticdb-typecache-refresh-for-buffer "semantic/db-typecache")
(declare-function eldoc-message "eldoc")
+(declare-function semantic-analyze-interesting-tag "semantic/analyze")
+(declare-function semantic-complete-analyze-inline-idle "semantic/complete")
+(declare-function semanticdb-deep-find-tags-by-name "semantic/db-find")
+(declare-function semanticdb-minor-mode-p "semantic/db-mode")
+(declare-function semanticdb-save-all-db-idle "semantic/db")
+(declare-function semanticdb-typecache-refresh-for-buffer "semantic/db-typecache")
+(declare-function semantic-decorate-flush-pending-decorations
+ "semantic/decorate/mode")
+(declare-function pulse-momentary-highlight-region "pulse")
+(declare-function pulse-momentary-highlight-overlay "pulse")
;;; Code:
(semantic-safe "Idle Work Including Error: %S"
;; Get the include related path.
(when (and (featurep 'semantic/db)
+ (require 'semantic/db-mode)
(semanticdb-minor-mode-p))
(require 'semantic/db-find)
(semanticdb-find-translate-path buffer nil)
))
)
- ;; Save everything.
- (semanticdb-save-all-db-idle)
+ (when (and (featurep 'semantic/db)
+ (require 'semantic/db-mode)
+ (semanticdb-minor-mode-p))
+ ;; Save everything.
+ (semanticdb-save-all-db-idle)
- ;; Parse up files near our active buffer
- (when semantic-idle-work-parse-neighboring-files-flag
- (semantic-safe "Idle Work Parse Neighboring Files: %S"
- (when (and (featurep 'semantic/db)
- (semanticdb-minor-mode-p))
+ ;; Parse up files near our active buffer
+ (when semantic-idle-work-parse-neighboring-files-flag
+ (semantic-safe "Idle Work Parse Neighboring Files: %S"
(set-buffer cb)
(semantic-idle-scheduler-work-parse-neighboring-files))
t)
- )
- ;; Save everything... again
- (semanticdb-save-all-db-idle)
+ ;; Save everything... again
+ (semanticdb-save-all-db-idle)
+ )
;; Done w/ processing
nil))))
;; After updating the tags, handle any pending decorations for this
;; buffer.
+ (require 'semantic/decorate/mode)
(semantic-decorate-flush-pending-decorations (current-buffer))
))
"Search for a semantic tag with name SYM in database tables.
Return the tag found or nil if not found.
If semanticdb is not in use, use the current buffer only."
- (car (if (and (featurep 'semantic/db) semanticdb-current-database)
+ (car (if (and (featurep 'semantic/db)
+ semanticdb-current-database
+ (require 'semantic/db-find))
(cdar (semanticdb-deep-find-tags-by-name sym))
(semantic-deep-find-tags-by-name sym (current-buffer)))))
(semantic-analyze-current-context (point))
(error nil))))
(when analysis
+ (require 'semantic/analyze)
(semantic-analyze-interesting-tag analysis))))
(defun semantic-idle-summary-current-symbol-info-default ()
"Perhaps add highlighting onto TAG.
TAG was found as the thing under point. If it happens to be
visible, then highlight it."
+ (require 'pulse)
(let* ((region (when (and (semantic-tag-p tag)
(semantic-tag-with-position-p tag))
(semantic-tag-overlay tag)))
"Highlight the tag, and references of the symbol under point.
Call `semantic-analyze-current-context' to find the reference tag.
Call `semantic-symref-hits-in-region' to identify local references."
+ (require 'pulse)
(when (semantic-idle-summary-useful-context-p)
(let* ((ctxt (semantic-analyze-current-context))
(Hbounds (when ctxt (oref ctxt bounds)))
nil))
)
;; Use idle version.
+ (require 'semantic/complete)
(semantic-complete-analyze-inline-idle)
)
(error nil))