]> git.eshelyaron.com Git - emacs.git/commit
* lisp/mail/footnote.el: Tweak markers convention
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 2 May 2019 14:27:42 +0000 (10:27 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 2 May 2019 14:27:42 +0000 (10:27 -0400)
commit3fa9c9f774277530f4dac6c4f5de157cb4cdc536
tree85d264dd468711f50172ed9d38dafddde97bdc11
parente10e314e2b7583d892e86cee92ec57d3a1030ce4
* lisp/mail/footnote.el: Tweak markers convention

Instead of using markers that are sometimes before and sometimes after
the [...] and using `insert-before-markers` to make sure those that are
are before stay before, always place them before, and make them
"move after"so they stay with their [...] without the need for
insert-before-markers.

(footnote--current-regexp): Add arg to match previous style.
Include the start/end "tags" in the regexp.  Adjust all callers.
(footnote--markers-alist): Change position of POINTERS.
(footnote--refresh-footnotes, footnote--renumber)
(footnote--make-hole, footnote-delete-footnote)
(footnote-back-to-message): Adjust accordingly, mostly by using
`looking-at` instead of `looking-back`.
(footnote--make-hole): Always return footnote nb to use.
(footnote-add-footnote): Simplify call accordingly.

* test/lisp/mail/footnote-tests.el: New file.
lisp/mail/footnote.el
test/lisp/mail/footnote-tests.el [new file with mode: 0644]