org-footnote: Fix `org-footnote-goto-previous-reference'
commit627cb7f578e07547f3a3ea73ef1670ed39084a82
authorNicolas Goaziou <mail@nicolasgoaziou.fr>
Sun, 24 Jun 2018 09:10:06 +0000 (24 11:10 +0200)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Sun, 24 Jun 2018 09:25:15 +0000 (24 11:25 +0200)
tree124140edff2215556c7bc3164558ca7d0de3d9bb
parent9553896b1171dc0ad0a7b1960144039de37583c5
org-footnote: Fix `org-footnote-goto-previous-reference'

* lisp/org-footnote.el (org-footnote-goto-previous-reference): Only
  add to mark ring on a successful match.  Improve error message when
  reference is outside visible part of buffer.
(org-footnote-get-next-reference): Avoid using
`org-footnote-at-reference-p', which is inaccurate, due to
`org-footnote-in-valid-context-p'.
* testing/lisp/test-org-footnote.el (test-org-footnote/goto-previous-reference):
  New test.
lisp/org-footnote.el
testing/lisp/test-org-footnote.el