Function: markdown-ts-code-block-mode-at

markdown-ts-code-block-mode-at is a byte-compiled function defined in markdown-ts-mode.el.gz.

Signature

(markdown-ts-code-block-mode-at &optional POS)

Documentation

Return the major mode for the code block at POS.

If POS is nil, use point. Returns nil if POS is not inside a fenced code block, or markdown-ts-default-code-block-mode if the language has no recognized mode.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/markdown-ts-mode.el.gz
(defun markdown-ts-code-block-mode-at (&optional pos)
  "Return the major mode for the code block at POS.
If POS is nil, use point.  Returns nil if POS is not inside a fenced
code block, or `markdown-ts-default-code-block-mode' if the language has
no recognized mode."
  (setq pos (or pos (point)))
  (when (markdown-ts-at-code-block-p pos)
    (or (cl-some (lambda (ov) (overlay-get ov 'markdown-ts-code-block-mode))
           (overlays-at pos))
        markdown-ts-default-code-block-mode)))