diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-10-01 08:57:33 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-10-01 08:57:33 +0200 |
commit | 0fff59cd43619fcc5644501ac9df74f39d7adf67 (patch) | |
tree | bd22ca931afbec752261c17d14ef813239c8a6bd | |
parent | 0e9d401519c020af29a7e35da7acfca25e6c3be4 (diff) | |
download | org-mode-0fff59cd43619fcc5644501ac9df74f39d7adf67.tar.gz |
org-footnote: Small refactoring
* lisp/org-footnote.el (org-footnote-renumber-fn:N): Small
refactoring.
-rw-r--r-- | lisp/org-footnote.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index 64e7cc3..76e7af3 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -894,8 +894,9 @@ If LABEL is non-nil, delete that footnote instead." (save-excursion (goto-char (match-beginning 0)) ;; Ensure match is a footnote reference or definition. - (when (or (and (bolp) (save-match-data (org-footnote-at-definition-p))) - (save-match-data (org-footnote-at-reference-p))) + (when (save-match-data (if (bolp) + (org-footnote-at-definition-p) + (org-footnote-at-reference-p))) (let ((new-val (or (cdr (assoc (match-string 1) map)) (number-to-string (incf n))))) (unless (assoc (match-string 1) map) |