Function: markdown-eldoc-function
markdown-eldoc-function is a byte-compiled function defined in
markdown-mode.el.
Signature
(markdown-eldoc-function &rest IGNORED)
Documentation
Return a helpful string when appropriate based on context.
* Report URL when point is at a hidden URL.
* Report language name when point is a code block with hidden markup.
Source Code
;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
;;; ElDoc Support =============================================================
(defun markdown-eldoc-function (&rest _ignored)
"Return a helpful string when appropriate based on context.
* Report URL when point is at a hidden URL.
* Report language name when point is a code block with hidden markup."
(cond
;; Hidden URL or reference for inline link
((and (or (thing-at-point-looking-at markdown-regex-link-inline)
(thing-at-point-looking-at markdown-regex-link-reference))
(or markdown-hide-urls markdown-hide-markup))
(let* ((imagep (string-equal (match-string 1) "!"))
(referencep (string-equal (match-string 5) "["))
(link (match-string-no-properties 6))
(edit-keys (markdown--substitute-command-keys
(if imagep
"\\[markdown-insert-image]"
"\\[markdown-insert-link]")))
(edit-str (propertize edit-keys 'face 'font-lock-constant-face))
(object (if referencep "reference" "URL")))
(format "Hidden %s (%s to edit): %s" object edit-str
(if referencep
(concat
(propertize "[" 'face 'markdown-markup-face)
(propertize link 'face 'markdown-reference-face)
(propertize "]" 'face 'markdown-markup-face))
(propertize link 'face 'markdown-url-face)))))
;; Hidden URL for wiki links
((and (and markdown-enable-wiki-links
(thing-at-point-looking-at markdown-regex-wiki-link))
(or markdown-hide-urls markdown-hide-markup))
(let* ((aliasp (string-equal (match-string-no-properties 4) "|"))
(part1 (match-string-no-properties 3))
(part2 (match-string-no-properties 5))
(link (if (and aliasp markdown-wiki-link-alias-first) part2 part1))
(edit-keys (markdown--substitute-command-keys
"\\[markdown-insert-wiki-link]"))
(edit-str (propertize edit-keys 'face 'font-lock-constant-face)))
(format "Hidden URL (%s to edit): %s"
edit-str (propertize link 'face 'markdown-reference-face))))
;; Hidden language name for fenced code blocks
((and (markdown-code-block-at-point-p)
(not (get-text-property (point) 'markdown-pre))
markdown-hide-markup)
(let ((lang (save-excursion (markdown-code-block-lang))))
(unless lang (setq lang "[unspecified]"))
(format "Hidden code block language: %s (%s to toggle markup)"
(propertize lang 'face 'markdown-language-keyword-face)
(markdown--substitute-command-keys
"\\[markdown-toggle-markup-hiding]"))))))