]> git.eshelyaron.com Git - emacs.git/commit
* lisp/mail/footnote.el: Use dolist and hoist regexps out of loops
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 2 May 2019 13:00:53 +0000 (09:00 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 2 May 2019 13:00:53 +0000 (09:00 -0400)
commit0efaae78f2b66de7ebeff7d1c16771ddafdf2d06
treebd1c649ff6001c334bf5976113952a1da492a730
parentcd3a7f35de8b0f39524912529d6fceda26571276
* lisp/mail/footnote.el: Use dolist and hoist regexps out of loops

(footnote--refresh-footnotes): Use pcase-dolist; compute regexp once
outside of the loops.  Use less confusing `literal` arg to `replace-match`
and specify `fixedcase` since footnote--index-to-string already chose
the proper case for us.
(footnote--renumber): Use dolist; compute regexp once
outside of the loops; shortcircuit when number is unchanged.
(footnote--text-under-cursor): Rewrite.
(footnote--make-hole): Use dolist.
(footnote-add-footnote): CSE.
(footnote-delete-footnote): Use dolist; compute regexp once
outside of the loop.
(footnote-delete-footnote): Don't renumber if there's no footnote left.
(footnote-renumber-footnotes): Use dolist.
lisp/mail/footnote.el