Function: semantic-ctxt-current-mode-semantic-grammar-mode

semantic-ctxt-current-mode-semantic-grammar-mode is a byte-compiled function defined in grammar.el.gz.

Signature

(semantic-ctxt-current-mode-semantic-grammar-mode &optional POINT)

Documentation

Return the major mode active at POINT.

POINT defaults to the value of point in current buffer. Return emacs-lisp-mode is POINT is within Lisp code, otherwise return the current major mode. Override semantic-ctxt-current-mode in semantic-grammar-mode buffers.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/grammar.el.gz
(define-mode-local-override semantic-ctxt-current-mode
  semantic-grammar-mode (&optional point)
  "Return the major mode active at POINT.
POINT defaults to the value of point in current buffer.
Return `emacs-lisp-mode' is POINT is within Lisp code, otherwise
return the current major mode."
  (save-excursion
    (and point (goto-char point))
    (if (semantic-grammar-in-lisp-p)
        'emacs-lisp-mode
      (semantic-ctxt-current-mode-default))))