comparison lisp/cedet/semantic.el @ 106150:269b53d49dd9

* 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.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 20 Nov 2009 01:35:49 +0000
parents cdc718e48308
children e60ede6c3be3
comparison
equal deleted inserted replaced
106149:8c0ff2935e8b 106150:269b53d49dd9
985 global-semantic-decoration-mode)))) 985 global-semantic-decoration-mode))))
986 (define-key cedet-menu-map [global-semantic-idle-completions-mode] 986 (define-key cedet-menu-map [global-semantic-idle-completions-mode]
987 '(menu-item "Show Tag Completions" global-semantic-idle-completions-mode 987 '(menu-item "Show Tag Completions" global-semantic-idle-completions-mode
988 :help "Show tag completions when idle" 988 :help "Show tag completions when idle"
989 :visible semantic-mode 989 :visible semantic-mode
990 :enable global-semantic-idle-scheduler-mode
990 :button (:toggle . global-semantic-idle-completions-mode))) 991 :button (:toggle . global-semantic-idle-completions-mode)))
991 (define-key cedet-menu-map [global-semantic-idle-summary-mode] 992 (define-key cedet-menu-map [global-semantic-idle-summary-mode]
992 '(menu-item "Show Tag Summaries" global-semantic-idle-summary-mode 993 '(menu-item "Show Tag Summaries" global-semantic-idle-summary-mode
993 :help "Show tag summaries when idle" 994 :help "Show tag summaries when idle"
994 :visible semantic-mode 995 :visible semantic-mode
996 :enable global-semantic-idle-scheduler-mode
995 :button (:toggle . global-semantic-idle-summary-mode))) 997 :button (:toggle . global-semantic-idle-summary-mode)))
998 (define-key cedet-menu-map [global-semantic-idle-scheduler-mode]
999 '(menu-item "Reparse When Idle" global-semantic-idle-scheduler-mode
1000 :help "Keep a buffer's parse tree up to date when idle"
1001 :visible semantic-mode
1002 :button (:toggle . global-semantic-idle-scheduler-mode)))
996 (define-key cedet-menu-map [global-semanticdb-minor-mode] 1003 (define-key cedet-menu-map [global-semanticdb-minor-mode]
997 '(menu-item "Semantic Database" global-semanticdb-minor-mode 1004 '(menu-item "Semantic Database" global-semanticdb-minor-mode
998 :help "Store tag information in a database" 1005 :help "Store tag information in a database"
999 :visible semantic-mode 1006 :visible semantic-mode
1000 :button (:toggle . global-semanticdb-minor-mode))) 1007 :button (:toggle . global-semanticdb-minor-mode))))
1001 (define-key cedet-menu-map [global-semantic-idle-scheduler-mode]
1002 '(menu-item "Reparse When Idle" global-semantic-idle-scheduler-mode
1003 :help "Keep a buffer's parse tree up to date when idle"
1004 :visible semantic-mode
1005 :button (:toggle . global-semantic-idle-scheduler-mode))))
1006 1008
1007 ;; The `semantic-mode' command, in conjuction with the 1009 ;; The `semantic-mode' command, in conjuction with the
1008 ;; `semantic-default-submodes' variable, toggles Semantic's various 1010 ;; `semantic-default-submodes' variable, toggles Semantic's various
1009 ;; auxilliary minor modes. 1011 ;; auxilliary minor modes.
1010 1012
1027 (defcustom semantic-default-submodes 1029 (defcustom semantic-default-submodes
1028 '(global-semantic-idle-scheduler-mode global-semanticdb-minor-mode) 1030 '(global-semantic-idle-scheduler-mode global-semanticdb-minor-mode)
1029 "List of auxiliary Semantic minor modes enabled by `semantic-mode'. 1031 "List of auxiliary Semantic minor modes enabled by `semantic-mode'.
1030 The possible elements of this list include the following: 1032 The possible elements of this list include the following:
1031 1033
1032 `semantic-highlight-func-mode' - Highlight the current tag. 1034 `global-semanticdb-minor-mode' - Maintain tag database.
1033 `semantic-decoration-mode' - Decorate tags based on various attributes. 1035 `global-semantic-idle-scheduler-mode' - Reparse buffer when idle.
1034 `semantic-stickyfunc-mode' - Track current function in the header-line. 1036 `global-semantic-idle-summary-mode' - Show summary of tag at point.
1035 `semantic-idle-completions-mode' - Provide smart symbol completion 1037 `global-semantic-idle-completions-mode' - Show completions when idle.
1036 automatically when idle. 1038 `global-semantic-decoration-mode' - Additional tag decorations.
1037 `semantic-idle-scheduler-mode' - Keep a buffer's parse tree up to date. 1039 `global-semantic-highlight-func-mode' - Highlight the current tag.
1038 `semanticdb-minor-mode' - Store tags when a buffer is not in memory. 1040 `global-semantic-stickyfunc-mode' - Show current fun in header line.
1039 `semantic-idle-summary-mode' - Show a summary for the code at point. 1041 `global-semantic-mru-bookmark-mode' - Provide `switch-to-buffer'-like
1040 `semantic-mru-bookmark-mode' - Provide `switch-to-buffer'-like
1041 keybinding for tag names." 1042 keybinding for tag names."
1042 :group 'semantic 1043 :group 'semantic
1043 :type `(set ,@(mapcar (lambda (c) (list 'const c)) 1044 :type `(set ,@(mapcar (lambda (c) (list 'const c))
1044 semantic-submode-list))) 1045 semantic-submode-list)))
1045 1046