Hello, As you know, one way to customize TeX-fold-mode is to supply functions to the variables TeX-fold-*-spec-list, which are then called by TeX-fold-hide-item. This patch introduces the convention that such functions are called with point positioned at the beginning of the item to be folded. This already happens "by accident" when the folding occurs via TeX-fold-region, but not via TeX-fold-post-command, for instance.
The motivation for having a consistent convention is that it makes it possible (or at least simpler) to introduce more advanced folding specs that depend on more than just the provided argument list. For example, in https://github.com/ultronozm/czm-tex-fold.el, I have used similar functionality, implemented via :override advice, to fold \begin{theorem} as "Theorem 1.1", with the correct equation number. The patch would allow me to excise the advice. Thanks, best, Paul
0001-Call-custom-folding-functions-with-consistent-point.patch
Description: Binary data
_______________________________________________ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex