forked from mirrors/org-mode
org-footnote: Small refactoring
* lisp/org-footnote.el (org-footnote-renumber-fn:N): Small refactoring.
This commit is contained in:
parent
0e9d401519
commit
0fff59cd43
|
@ -894,8 +894,9 @@ If LABEL is non-nil, delete that footnote instead."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (match-beginning 0))
|
(goto-char (match-beginning 0))
|
||||||
;; Ensure match is a footnote reference or definition.
|
;; Ensure match is a footnote reference or definition.
|
||||||
(when (or (and (bolp) (save-match-data (org-footnote-at-definition-p)))
|
(when (save-match-data (if (bolp)
|
||||||
(save-match-data (org-footnote-at-reference-p)))
|
(org-footnote-at-definition-p)
|
||||||
|
(org-footnote-at-reference-p)))
|
||||||
(let ((new-val (or (cdr (assoc (match-string 1) map))
|
(let ((new-val (or (cdr (assoc (match-string 1) map))
|
||||||
(number-to-string (incf n)))))
|
(number-to-string (incf n)))))
|
||||||
(unless (assoc (match-string 1) map)
|
(unless (assoc (match-string 1) map)
|
||||||
|
|
Loading…
Reference in New Issue