]> code.delx.au - gnu-emacs/commitdiff
(global-semantic-idle-scheduler-mode): Move after definition of
authorGlenn Morris <rgm@gnu.org>
Tue, 24 Nov 2009 02:38:08 +0000 (02:38 +0000)
committerGlenn Morris <rgm@gnu.org>
Tue, 24 Nov 2009 02:38:08 +0000 (02:38 +0000)
global-semantic-idle-tag-highlight-mode.

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

index c051c1e1a66fa0be1a4316312f02bb8fc1ef83a1..212ab1f1846f8a86b24153df377de91302cae4da 100644 (file)
@@ -3,6 +3,9 @@
        * bookmark.el (bookmark-bmenu-hide-filenames): Remove assignment to
        deleted variable bookmark-bmenu-bookmark-column.
 
+       * cedet/semantic/idle.el (global-semantic-idle-scheduler-mode):
+       Move after definition of global-semantic-idle-tag-highlight-mode.
+
 2009-11-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * bookmark.el (bookmark-bmenu-search): Clear echo area when exiting.
index ca5a00a79f56b8fab507ec4fd9b1a66d263b3bf6..acb2a737bda1f17f66da52f32d1f2ca9d31543d7 100644 (file)
@@ -139,24 +139,6 @@ unlikely the user would be ready to type again right away."
   :set (lambda (sym val)
          (global-semantic-idle-scheduler-mode (if val 1 -1))))
 
-;;;###autoload
-(defun global-semantic-idle-scheduler-mode (&optional arg)
-  "Toggle global use of option `semantic-idle-scheduler-mode'.
-The idle scheduler with automatically reparse buffers in idle time,
-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 the function `semantic-idle-scheduler-mode'."
   :group 'semantic
@@ -589,6 +571,7 @@ Does nothing if the current buffer doesn't need reparsing."
 ;; needed to create the minor mode that will enable or disable
 ;; a services.  The services must provide a single function.
 
+;; FIXME doc is incomplete.
 (defmacro define-semantic-idle-service (name doc &rest forms)
   "Create a new idle services with NAME.
 DOC will be a documentation string describing FORMS.
@@ -972,6 +955,25 @@ Call `semantic-symref-hits-in-region' to identify local references."
           (semantic-tag-end tag)))
        ))))
 
+\f
+;;;###autoload
+(defun global-semantic-idle-scheduler-mode (&optional arg)
+  "Toggle global use of option `semantic-idle-scheduler-mode'.
+The idle scheduler with automatically reparse buffers in idle time,
+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)))
+
 \f
 ;;; Completion Popup Mode
 ;;