GNU bug report logs - #66771
[PATCH] Throw out fold spec after a single failure

Previous Next

Package: auctex;

Reported by: Tony Zorman <soliditsallgood <at> mailbox.org>

Date: Fri, 27 Oct 2023 06:37:02 UTC

Severity: normal

Tags: patch

Done: Ikumi Keita <ikumi <at> ikumi.que.jp>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Tony Zorman <soliditsallgood <at> mailbox.org>
To: Arash Esbati <arash <at> gnu.org>, Ikumi Keita <ikumi <at> ikumi.que.jp>
Cc: 66771 <at> debbugs.gnu.org
Subject: bug#66771: [PATCH] Throw out fold spec after a single failure
Date: Sun, 17 Dec 2023 20:18:41 +0100
[Message part 1 (text/plain, inline)]
On Sun, Dec 17 2023 19:11, Arash Esbati wrote:
> Thanks for this fix.  I think this change now produces:
>
>   In TeX-fold-expand-spec:
>   tex-fold.el:750:36: Warning: reference to free variable ‘elt’
>
> Can you please have a look and silence this?

Oh, how embarrassing! Sorry about that, it seems like rebasing was too
smart in how it handled the conflicts. Attached is a patch that should
fix this.

Best,
  Tony

[0001-tex-fold.el-TeX-fold-expand-spec-Fix-reference-to-fr.patch (text/x-patch, inline)]
From 6f36aed879b9b2b9bf8821749eb44d9f56d85dc6 Mon Sep 17 00:00:00 2001
From: Tony Zorman <soliditsallgood <at> mailbox.org>
Date: Sun, 17 Dec 2023 20:13:45 +0100
Subject: [PATCH] ; * tex-fold.el (TeX-fold-expand-spec): Fix reference to free
 variable

---
 tex-fold.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tex-fold.el b/tex-fold.el
index d4dacc16..0952bccc 100644
--- a/tex-fold.el
+++ b/tex-fold.el
@@ -747,7 +747,7 @@ Replace them with the respective macro argument."
            ;; If there is something to replace and the closing delimiter
            ;; matches the opening one…
            (if-let (((string-match "\\([[{<(]\\)\\([1-9]\\)\\([]}>)]\\)"
-                                   elt index))
+                                   spec index))
                     (open (string-to-char (match-string 1 spec)))
                     (num (string-to-number (match-string 2 spec)))
                     (close (string-to-char (match-string 3 spec)))
-- 
2.42.0

[Message part 3 (text/plain, inline)]
-- 
Tony Zorman | https://tony-zorman.com/

This bug report was last modified 1 year and 158 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.