Commit 725bff06 authored by Chong Yidong's avatar Chong Yidong
Browse files

* cedet/cedet.el (cedet-menu-map): Re-order menu items.

* cedet/semantic.el: Enable idle-mode menu items only if
global-semantic-idle-scheduler-mode is enabled.
(semantic-default-submodes): Doc fix.

* cedet/semantic/idle.el (global-semantic-idle-scheduler-mode):
When turning off, disable other idle modes.
parent b58edcb6
2009-11-20 Chong Yidong <cyd@stupidchicken.com>
* cedet/cedet.el (cedet-menu-map): Re-order menu items.
* cedet/semantic.el: Enable idle-mode menu items only if
global-semantic-idle-scheduler-mode is enabled.
(semantic-default-submodes): Doc fix.
* cedet/semantic/idle.el (global-semantic-idle-scheduler-mode):
When turning off, disable other idle modes.
2009-11-20 Jay Belanger <jay.p.belanger@gmail.com> 2009-11-20 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc.el (calc-set-mode-line): Rename * calc/calc.el (calc-set-mode-line): Rename
......
...@@ -61,8 +61,8 @@ ...@@ -61,8 +61,8 @@
(define-key map [global-semantic-decoration-mode] 'undefined) (define-key map [global-semantic-decoration-mode] 'undefined)
(define-key map [global-semantic-idle-completions-mode] 'undefined) (define-key map [global-semantic-idle-completions-mode] 'undefined)
(define-key map [global-semantic-idle-summary-mode] 'undefined) (define-key map [global-semantic-idle-summary-mode] 'undefined)
(define-key map [global-semanticdb-minor-mode] 'undefined)
(define-key map [global-semantic-idle-scheduler-mode] 'undefined) (define-key map [global-semantic-idle-scheduler-mode] 'undefined)
(define-key map [global-semanticdb-minor-mode] 'undefined)
(define-key map [cedet-menu-separator] 'undefined) (define-key map [cedet-menu-separator] 'undefined)
(define-key map [ede-find-file] 'undefined) (define-key map [ede-find-file] 'undefined)
(define-key map [ede-speedbar] 'undefined) (define-key map [ede-speedbar] 'undefined)
......
...@@ -987,22 +987,24 @@ Throw away all the old tags, and recreate the tag database." ...@@ -987,22 +987,24 @@ Throw away all the old tags, and recreate the tag database."
'(menu-item "Show Tag Completions" global-semantic-idle-completions-mode '(menu-item "Show Tag Completions" global-semantic-idle-completions-mode
:help "Show tag completions when idle" :help "Show tag completions when idle"
:visible semantic-mode :visible semantic-mode
:enable global-semantic-idle-scheduler-mode
:button (:toggle . global-semantic-idle-completions-mode))) :button (:toggle . global-semantic-idle-completions-mode)))
(define-key cedet-menu-map [global-semantic-idle-summary-mode] (define-key cedet-menu-map [global-semantic-idle-summary-mode]
'(menu-item "Show Tag Summaries" global-semantic-idle-summary-mode '(menu-item "Show Tag Summaries" global-semantic-idle-summary-mode
:help "Show tag summaries when idle" :help "Show tag summaries when idle"
:visible semantic-mode :visible semantic-mode
:enable global-semantic-idle-scheduler-mode
:button (:toggle . global-semantic-idle-summary-mode))) :button (:toggle . global-semantic-idle-summary-mode)))
(define-key cedet-menu-map [global-semanticdb-minor-mode]
'(menu-item "Semantic Database" global-semanticdb-minor-mode
:help "Store tag information in a database"
:visible semantic-mode
:button (:toggle . global-semanticdb-minor-mode)))
(define-key cedet-menu-map [global-semantic-idle-scheduler-mode] (define-key cedet-menu-map [global-semantic-idle-scheduler-mode]
'(menu-item "Reparse When Idle" global-semantic-idle-scheduler-mode '(menu-item "Reparse When Idle" global-semantic-idle-scheduler-mode
:help "Keep a buffer's parse tree up to date when idle" :help "Keep a buffer's parse tree up to date when idle"
:visible semantic-mode :visible semantic-mode
:button (:toggle . global-semantic-idle-scheduler-mode)))) :button (:toggle . global-semantic-idle-scheduler-mode)))
(define-key cedet-menu-map [global-semanticdb-minor-mode]
'(menu-item "Semantic Database" global-semanticdb-minor-mode
:help "Store tag information in a database"
:visible semantic-mode
:button (:toggle . global-semanticdb-minor-mode))))
;; The `semantic-mode' command, in conjuction with the ;; The `semantic-mode' command, in conjuction with the
;; `semantic-default-submodes' variable, toggles Semantic's various ;; `semantic-default-submodes' variable, toggles Semantic's various
...@@ -1029,15 +1031,14 @@ Prevent this load system from loading files in twice.") ...@@ -1029,15 +1031,14 @@ Prevent this load system from loading files in twice.")
"List of auxiliary Semantic minor modes enabled by `semantic-mode'. "List of auxiliary Semantic minor modes enabled by `semantic-mode'.
The possible elements of this list include the following: The possible elements of this list include the following:
`semantic-highlight-func-mode' - Highlight the current tag. `global-semanticdb-minor-mode' - Maintain tag database.
`semantic-decoration-mode' - Decorate tags based on various attributes. `global-semantic-idle-scheduler-mode' - Reparse buffer when idle.
`semantic-stickyfunc-mode' - Track current function in the header-line. `global-semantic-idle-summary-mode' - Show summary of tag at point.
`semantic-idle-completions-mode' - Provide smart symbol completion `global-semantic-idle-completions-mode' - Show completions when idle.
automatically when idle. `global-semantic-decoration-mode' - Additional tag decorations.
`semantic-idle-scheduler-mode' - Keep a buffer's parse tree up to date. `global-semantic-highlight-func-mode' - Highlight the current tag.
`semanticdb-minor-mode' - Store tags when a buffer is not in memory. `global-semantic-stickyfunc-mode' - Show current fun in header line.
`semantic-idle-summary-mode' - Show a summary for the code at point. `global-semantic-mru-bookmark-mode' - Provide `switch-to-buffer'-like
`semantic-mru-bookmark-mode' - Provide `switch-to-buffer'-like
keybinding for tag names." keybinding for tag names."
:group 'semantic :group 'semantic
:type `(set ,@(mapcar (lambda (c) (list 'const c)) :type `(set ,@(mapcar (lambda (c) (list 'const c))
......
...@@ -147,12 +147,18 @@ and then schedule other jobs setup with `semantic-idle-scheduler-add'. ...@@ -147,12 +147,18 @@ and then schedule other jobs setup with `semantic-idle-scheduler-add'.
If ARG is positive, enable, if it is negative, disable. If ARG is positive, enable, if it is negative, disable.
If ARG is nil, then toggle." If ARG is nil, then toggle."
(interactive "P") (interactive "P")
;; When turning off, disable other idle modes.
(when (or (and (numberp arg) (< arg 0))
(and (null arg) global-semantic-idle-scheduler-mode))
(global-semantic-idle-summary-mode -1)
(global-semantic-idle-tag-highlight-mode -1)
(global-semantic-idle-completions-mode -1))
(setq global-semantic-idle-scheduler-mode (setq global-semantic-idle-scheduler-mode
(semantic-toggle-minor-mode-globally (semantic-toggle-minor-mode-globally
'semantic-idle-scheduler-mode arg))) 'semantic-idle-scheduler-mode arg)))
(defcustom semantic-idle-scheduler-mode-hook nil (defcustom semantic-idle-scheduler-mode-hook nil
"Hook run at the end of function `semantic-idle-scheduler-mode'." "Hook run at the end of the function `semantic-idle-scheduler-mode'."
:group 'semantic :group 'semantic
:type 'hook) :type 'hook)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment