[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex b4dde3e325 09/23: Fix `preview-region' on repeat
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex b4dde3e325 09/23: Fix `preview-region' on repeated math constructs |
Date: |
Thu, 18 Apr 2024 05:43:20 -0400 (EDT) |
branch: externals/auctex
commit b4dde3e325034f832b0a7a35f3c2acae3fd754af
Author: Paul Nelson <ultrono@gmail.com>
Commit: Arash Esbati <arash@gnu.org>
Fix `preview-region' on repeated math constructs
* preview.el.in (preview--region-begin): New variable.
(preview-parse-messages, preview-region): Use and set the new
variable in order to make `preview-region' work correctly when
applied to, e.g., the second "$x$" in "$x$ $x$". (bug#62445)
---
preview.el.in | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/preview.el.in b/preview.el.in
index 09836d9e34..9541043997 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -3268,6 +3268,8 @@ Return a new string."
(setq result (concat result string))
result))
+(defvar-local preview--region-begin nil)
+
(defun preview-parse-messages (open-closure)
"Turn all preview snippets into overlays.
This parses the pseudo error messages from the preview
@@ -3538,6 +3540,15 @@ name(\\([^)]+\\))\\)\\|\
(goto-char (point-min))
(forward-line (1- line)))
(setq lpoint (point))
+
+ ;; The following addresses the bug described at
+ ;;
https://lists.gnu.org/archive/html/bug-auctex/2023-03/msg00007.html
+ ;; (bug#62445)
+ (and preview--region-begin
+ (< (point)
+ preview--region-begin)
+ (goto-char preview--region-begin))
+
(cond
((search-forward (concat string after-string)
(line-end-position) t)
@@ -4033,6 +4044,7 @@ stored in `preview-dumped-alist'."
"<none>")
(TeX-current-offset begin)))
(setq TeX-current-process-region-p t)
+ (setq preview--region-begin begin)
(preview-generate-preview (TeX-region-file)
(preview-do-replacements
(TeX-command-expand
- [elpa] externals/auctex 0fcc152333 03/23: Document the new customize option, (continued)
- [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, 2024/04/18
- [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 <=
- [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
- [elpa] externals/auctex f61de0abe6 18/23: Add section folding commands, Tassilo Horn, 2024/04/18
- [elpa] externals/auctex ed37457621 21/23: ; Fix commit e4def30851, Tassilo Horn, 2024/04/18
- [elpa] externals/auctex 07c2cf38a1 22/23: * NEWS.org: New file., Tassilo Horn, 2024/04/18
- [elpa] externals/auctex d9f8ff12b1 11/23: Support mcite compat macros provided by biblatex, Tassilo Horn, 2024/04/18
- [elpa] externals/auctex 18a3dc7b43 20/23: Make preview section commands preserve mark, Tassilo Horn, 2024/04/18
- [elpa] externals/auctex e4def30851 16/23: Make preview placement more flexible, Tassilo Horn, 2024/04/18
- [elpa] externals/auctex d74338a1db 12/23: Add new custom option `TeX-fold-region-functions', Tassilo Horn, 2024/04/18