Function: markdown-footnote-counter-inc
markdown-footnote-counter-inc is a natively compiled function defined
in markdown-mode.el.
Signature
(markdown-footnote-counter-inc)
Documentation
Increment markdown-footnote-counter and return the new value.
Source Code
;; Defined in /nix/store/p33zgg95aglc47pl6zlgs43vki0snxf8-emacs-packages-deps/share/emacs/site-lisp/elpa/markdown-mode-20260827.909/markdown-mode.el
;;; Footnotes =================================================================
(defun markdown-footnote-counter-inc ()
"Increment `markdown-footnote-counter' and return the new value."
(when (= markdown-footnote-counter 0) ; hasn't been updated in this buffer yet.
(save-excursion
(goto-char (point-min))
(while (re-search-forward (concat "^\\[\\^\\(" markdown-footnote-chars "*?\\)\\]:")
(point-max) t)
(let ((fn (string-to-number (match-string 1))))
(when (> fn markdown-footnote-counter)
(setq markdown-footnote-counter fn))))))
(cl-incf markdown-footnote-counter))