Variable: semantic-show-unmatched-syntax-mode
semantic-show-unmatched-syntax-mode is a buffer-local variable defined
in util-modes.el.gz.
Documentation
Non-nil if Semantic-Show-Unmatched-Syntax mode is enabled.
Use the command semantic-show-unmatched-syntax-mode(var)/semantic-show-unmatched-syntax-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-unmatched-syntax-mode
"Minor mode to highlight unmatched lexical syntax tokens.
When a parser executes, some elements in the buffer may not match any
parser rules. These text characters are considered unmatched syntax.
Often time, the display of unmatched syntax can expose coding
problems before the compiler is run.
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.
\\{semantic-show-unmatched-syntax-mode-map}"
:keymap semantic-show-unmatched-syntax-mode-map
(if semantic-show-unmatched-syntax-mode
(if (not (and (featurep 'semantic) (semantic-active-p)))
(progn
;; Disable minor mode if semantic stuff not available
(setq semantic-show-unmatched-syntax-mode nil)
(error "Buffer %s was not set up for parsing"
(buffer-name)))
;; Add hooks
(add-hook 'semantic-unmatched-syntax-hook
#'semantic-show-unmatched-syntax nil t)
(add-hook 'semantic-pre-clean-token-hooks
#'semantic-clean-token-of-unmatched-syntax nil t)
;; Show unmatched syntax elements
(if (not (semantic--umatched-syntax-needs-refresh-p))
(semantic-show-unmatched-syntax
(semantic-unmatched-syntax-tokens))))
;; Remove hooks
(remove-hook 'semantic-unmatched-syntax-hook
#'semantic-show-unmatched-syntax t)
(remove-hook 'semantic-pre-clean-token-hooks
#'semantic-clean-token-of-unmatched-syntax t)
;; Cleanup unmatched-syntax highlighting
(semantic-clean-unmatched-syntax-in-buffer)))