Variable: semantic-show-parser-state-mode

semantic-show-parser-state-mode is a buffer-local variable defined in util-modes.el.gz.

Documentation

Non-nil if Semantic-Show-Parser-State mode is enabled.

Use the command semantic-show-parser-state-mode(var)/semantic-show-parser-state-mode(fun) to change this variable.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/util-modes.el.gz
;;;###autoload
(define-minor-mode semantic-show-parser-state-mode
  "Minor mode for displaying parser cache state in the modeline.
The cache can be in one of three states.  They are
Up to date, Partial reparse needed, and Full reparse needed.
The state is indicated in the modeline with the following characters:
 `-'  ->  The cache is up to date.
 `!'  ->  The cache requires a full update.
 `~'  ->  The cache needs to be incrementally parsed.
 `%'  ->  The cache is not currently parsable.
 `@'  ->  Auto-parse in progress (not set here.)

The minor mode can be turned on only if semantic feature is
available and the current buffer was set up for parsing.  Return
non-nil if the minor mode is enabled."
  :keymap semantic-show-parser-state-mode-map
  (if semantic-show-parser-state-mode
      (if (not (and (featurep 'semantic) (semantic-active-p)))
          (progn
            ;; Disable minor mode if semantic stuff not available
            (setq semantic-show-parser-state-mode nil)
            (error "Buffer %s was not set up for parsing"
                   (buffer-name)))
	;; Set up mode line

	(when (not
	       (memq 'semantic-show-parser-state-string mode-line-modified))
	  (setq mode-line-modified
		(append mode-line-modified
			'(semantic-show-parser-state-string))))
	;; Add hooks
        (add-hook 'semantic-edits-new-change-functions
                  #'semantic-show-parser-state-marker nil t)
	(add-hook 'semantic-edits-incremental-reparse-failed-hook
		  #'semantic-show-parser-state-marker nil t)
	(add-hook 'semantic-after-partial-cache-change-hook
		  #'semantic-show-parser-state-marker nil t)
	(add-hook 'semantic-after-toplevel-cache-change-hook
		  #'semantic-show-parser-state-marker nil t)
	(semantic-show-parser-state-marker)

	(add-hook 'semantic-before-auto-parse-hooks
		  #'semantic-show-parser-state-auto-marker nil t)
	(add-hook 'semantic-after-auto-parse-hooks
		  #'semantic-show-parser-state-marker nil t)

	(add-hook 'semantic-before-idle-scheduler-reparse-hook
		  #'semantic-show-parser-state-auto-marker nil t)
	(add-hook 'semantic-after-idle-scheduler-reparse-hook
		  #'semantic-show-parser-state-marker nil t))
    ;; Remove parts of mode line
    (setq mode-line-modified
	  (delq 'semantic-show-parser-state-string mode-line-modified))
    ;; Remove hooks
    (remove-hook 'semantic-edits-new-change-functions
		 #'semantic-show-parser-state-marker t)
    (remove-hook 'semantic-edits-incremental-reparse-failed-hook
		 #'semantic-show-parser-state-marker t)
    (remove-hook 'semantic-after-partial-cache-change-hook
		 #'semantic-show-parser-state-marker t)
    (remove-hook 'semantic-after-toplevel-cache-change-hook
		 #'semantic-show-parser-state-marker t)

    (remove-hook 'semantic-before-auto-parse-hooks
		 #'semantic-show-parser-state-auto-marker t)
    (remove-hook 'semantic-after-auto-parse-hooks
		 #'semantic-show-parser-state-marker t)

    (remove-hook 'semantic-before-idle-scheduler-reparse-hook
		 #'semantic-show-parser-state-auto-marker t)
    (remove-hook 'semantic-after-idle-scheduler-reparse-hook
		 #'semantic-show-parser-state-marker t)))