[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 5f40b686b4 14/23: Call custom folding functions
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 5f40b686b4 14/23: Call custom folding functions with consistent point |
Date: |
Thu, 18 Apr 2024 05:43:24 -0400 (EDT) |
branch: externals/auctex
commit 5f40b686b46f74c441441839ad67703b743c900f
Author: Paul Nelson <ultrono@gmail.com>
Commit: Arash Esbati <arash@gnu.org>
Call custom folding functions with consistent point
* tex-fold.el (TeX-fold-hide-item): Call folding spec with point
at beginning of item.
* doc/auctex.texi (Folding): Mention the new convention.
(bug#70331)
---
doc/auctex.texi | 9 +++++----
tex-fold.el | 4 +++-
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 343caa5903..064ba297ac 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -2767,10 +2767,11 @@ respective mandatory argument of a @LaTeX{} macro will
be used as the
placeholder.
If the first element is a function symbol, the function will be called
-with all mandatory arguments of the macro and the result of the function
-call will be used as a replacement for the macro.
-Such functions typically return a string, but may also return the
-symbol @code{abort} to indicate that the macro should not be folded.
+with all mandatory arguments of the macro, and with point positioned at
+the beginning of the macro. The result of the function call will be used
+as a replacement for the macro. Such functions typically return a string,
+but may also return the symbol @code{abort} to indicate that the macro
+should not be folded.
The placeholder is made by copying the text from the buffer together with
its properties, i.e.@: its face as well. If fontification has not
diff --git a/tex-fold.el b/tex-fold.el
index e593aed58e..fadc145a13 100644
--- a/tex-fold.el
+++ b/tex-fold.el
@@ -816,7 +816,9 @@ That means, put respective properties onto overlay OV."
(setq arg-list (append arg-list (list (car arg)))))
(setq n (1+ n)))
(or (condition-case nil
- (apply spec arg-list)
+ (save-excursion
+ (goto-char ov-start)
+ (apply spec arg-list))
(error nil))
"[Error: No content or function found]")))
(t (or (TeX-fold-macro-nth-arg spec ov-start ov-end)
- [elpa] externals/auctex updated (79c984e1a5 -> ecb6c62e85), Tassilo Horn, 2024/04/18
- [elpa] externals/auctex 0fcc152333 03/23: Document the new customize option, Tassilo Horn, 2024/04/18
- [elpa] externals/auctex c008bb60b2 02/23: Make auto reveal feature configurable in folding, Tassilo Horn, 2024/04/18
- [elpa] externals/auctex dfa05bf69d 01/23: Track the latest version of fntguide.tex, Tassilo Horn, 2024/04/18
- [elpa] externals/auctex 5f40b686b4 14/23: Call custom folding functions with consistent point,
Tassilo Horn <=
- [elpa] externals/auctex 03793072c1 05/23: * tex.el (TeX-command): Adjust macOS version and name., Tassilo Horn, 2024/04/18
- [elpa] externals/auctex ecb6c62e85 23/23: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2024/04/18
- [elpa] externals/auctex 49c9feb133 10/23: Allow preprocessing of previews, Tassilo Horn, 2024/04/18
- [elpa] externals/auctex ec48f765fb 13/23: Allow preview to work in non-file buffers, Tassilo Horn, 2024/04/18
- [elpa] externals/auctex 0aa5010255 06/23: Update style/verbatim.el to package v1.5x, Tassilo Horn, 2024/04/18
- [elpa] externals/auctex 2fe75e6726 19/23: Make "locating previews..." message configurable, Tassilo Horn, 2024/04/18
- [elpa] externals/auctex b4dde3e325 09/23: Fix `preview-region' on repeated math constructs, Tassilo Horn, 2024/04/18
- [elpa] externals/auctex 5343cf2ec3 07/23: Be aware of comments in docTeX-mode, Tassilo Horn, 2024/04/18
- [elpa] externals/auctex ec4e27ec21 04/23: * doc/changes.texi: Add an entry for `TeX-fold-auto-reveal'., Tassilo Horn, 2024/04/18
- [elpa] externals/auctex 5970fbf499 15/23: * .dir-locals.el: Catch up with Emacs' .dir-locals., Tassilo Horn, 2024/04/18