Mercurial > emacs
diff lisp/cedet/semantic/idle.el @ 108211:73a1ddc06d0e
Use a mode-line spec rather than a static string in Semantic.
* cedet/semantic/util-modes.el:
(semantic-minor-modes-format): New var to replace...
(semantic-minor-modes-status): Remove.
(semantic-mode-line-update): Construct a mode-line spec rather than
a static string so that mouse buttons can be used on individual minor
modes and so that semantic-mode-line-update only needs to be called
when global settings are changed.
(semantic-add-minor-mode, semantic-toggle-minor-mode-globally):
Call semantic-mode-line-update.
(semantic-toggle-minor-mode-globally): Don't assume mode is on
minor-mode-alist, check semantic-minor-mode-alist as well.
(semantic-stickyfunc-mode, semantic-show-parser-state-auto-marker)
(semantic-show-parser-state-marker, semantic-show-parser-state-mode)
(semantic-show-unmatched-syntax-mode, semantic-highlight-edits-mode):
* cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode):
* cedet/semantic/idle.el (semantic-idle-scheduler-mode)
(define-semantic-idle-service, semantic-idle-summary-mode):
* cedet/semantic/decorate/mode.el (semantic-decoration-mode):
Don't call semantic-mode-line-update any more.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sun, 02 May 2010 01:06:53 -0400 |
parents | 5143700578d0 |
children | b799d38f522a |
line wrap: on
line diff
--- a/lisp/cedet/semantic/idle.el Sat May 01 23:38:19 2010 -0400 +++ b/lisp/cedet/semantic/idle.el Sun May 02 01:06:53 2010 -0400 @@ -177,8 +177,7 @@ (setq semantic-idle-scheduler-mode nil) (error "Buffer %s was not set up idle time scheduling" (buffer-name))) - (semantic-idle-scheduler-setup-timers))) - (semantic-mode-line-update)) + (semantic-idle-scheduler-setup-timers)))) (semantic-add-minor-mode 'semantic-idle-scheduler-mode "ARP") @@ -589,8 +588,7 @@ ;; Enable the mode mode (semantic-idle-scheduler-add #',func)) ;; Disable the mode mode - (semantic-idle-scheduler-remove #',func)) - (semantic-mode-line-update)) + (semantic-idle-scheduler-remove #',func))) (semantic-add-minor-mode ',mode "") ; idle schedulers are quiet? @@ -758,8 +756,7 @@ (add-hook 'pre-command-hook 'semantic-idle-summary-refresh-echo-area t)) ;; Disable the mode (semantic-idle-scheduler-remove 'semantic-idle-summary-idle-function) - (remove-hook 'pre-command-hook 'semantic-idle-summary-refresh-echo-area t)) - (semantic-mode-line-update)) + (remove-hook 'pre-command-hook 'semantic-idle-summary-refresh-echo-area t))) (defun semantic-idle-summary-refresh-echo-area () (and semantic-idle-summary-mode