]> git.eshelyaron.com Git - emacs.git/commitdiff
* cedet/cedet.el (cedet-menu-map): Re-order menu items.
authorChong Yidong <cyd@stupidchicken.com>
Fri, 20 Nov 2009 01:35:49 +0000 (01:35 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Fri, 20 Nov 2009 01:35:49 +0000 (01:35 +0000)
* 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.

lisp/ChangeLog
lisp/cedet/cedet.el
lisp/cedet/semantic.el
lisp/cedet/semantic/idle.el

index eab6da7e06118a5cef7efdfd918f409ab059ef73..a6c39f8781c0feb50f34f1dd89c552100110da32 100644 (file)
@@ -1,3 +1,14 @@
+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>
 
        * calc/calc.el (calc-set-mode-line): Rename
index a2725989731c0ac0e99658b2082ab17c2428194c..4bf598abdaec224e9cb65df37b1861a822605e68 100644 (file)
@@ -61,8 +61,8 @@
     (define-key map [global-semantic-decoration-mode]       'undefined)
     (define-key map [global-semantic-idle-completions-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-semanticdb-minor-mode]          'undefined)
     (define-key map [cedet-menu-separator] 'undefined)
     (define-key map [ede-find-file]        'undefined)
     (define-key map [ede-speedbar]         'undefined)
index 08a93e3f69fb2cdd23cecd28a9f97b72f46671b7..446d1e0a3e6adbb5c9b59ca6d2ac4b7e11bd1d53 100644 (file)
@@ -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
                :help "Show tag completions when idle"
                :visible semantic-mode
+               :enable global-semantic-idle-scheduler-mode
                :button (:toggle . global-semantic-idle-completions-mode)))
   (define-key cedet-menu-map [global-semantic-idle-summary-mode]
     '(menu-item "Show Tag Summaries" global-semantic-idle-summary-mode
                :help "Show tag summaries when idle"
                :visible semantic-mode
+               :enable global-semantic-idle-scheduler-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]
     '(menu-item "Reparse When Idle" global-semantic-idle-scheduler-mode
                :help "Keep a buffer's parse tree up to date when idle"
                :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
 ;; `semantic-default-submodes' variable, toggles Semantic's various
@@ -1029,15 +1031,14 @@ Prevent this load system from loading files in twice.")
   "List of auxiliary Semantic minor modes enabled by `semantic-mode'.
 The possible elements of this list include the following:
 
- `semantic-highlight-func-mode'   - Highlight the current tag.
- `semantic-decoration-mode' - Decorate tags based on various attributes.
- `semantic-stickyfunc-mode' - Track current function in the header-line.
- `semantic-idle-completions-mode' - Provide smart symbol completion
-                                    automatically when idle.
- `semantic-idle-scheduler-mode'   - Keep a buffer's parse tree up to date.
- `semanticdb-minor-mode'    - Store tags when a buffer is not in memory.
- `semantic-idle-summary-mode'     - Show a summary for the code at point.
- `semantic-mru-bookmark-mode'     - Provide `switch-to-buffer'-like
+ `global-semanticdb-minor-mode'        - Maintain tag database.
+ `global-semantic-idle-scheduler-mode' - Reparse buffer when idle.
+ `global-semantic-idle-summary-mode'   - Show summary of tag at point.
+ `global-semantic-idle-completions-mode' - Show completions when idle.
+ `global-semantic-decoration-mode'     - Additional tag decorations.
+ `global-semantic-highlight-func-mode' - Highlight the current tag.
+ `global-semantic-stickyfunc-mode'     - Show current fun in header line.
+ `global-semantic-mru-bookmark-mode'   - Provide `switch-to-buffer'-like
                                     keybinding for tag names."
   :group 'semantic
   :type `(set ,@(mapcar (lambda (c) (list 'const c))
index e8be0bb97eb7873638313ecb8fd3c5a4f9eaeb4c..7f5915064b2be321f9e572ab266dd7a79c1c1886 100644 (file)
@@ -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 nil, then toggle."
   (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
         (semantic-toggle-minor-mode-globally
          'semantic-idle-scheduler-mode arg)))
 
 (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
   :type 'hook)