bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58329: 29.0.50; [PATCH] Pass correct environment name to `reftex-lab


From: Lars Ingebrigtsen
Subject: bug#58329: 29.0.50; [PATCH] Pass correct environment name to `reftex-label'
Date: Thu, 06 Oct 2022 14:19:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Arash Esbati <arash@gnu.org> writes:

> -     '(if (and (boundp 'reftex-mode) reftex-mode) (reftex-label "table"))))
> +     '(if (and (boundp 'reftex-mode) reftex-mode) (reftex-label "figure"))))

Your change look like the right thing to me.  This code was apparently
introduced in:

commit dd166d5fa1712b0dda35859c91d89666c2873471
Author:     Stefan Monnier <monnier@iro.umontreal.ca>
AuthorDate: Sun Oct 3 19:53:23 2004 +0000

It looks to me like a cut and paste error -- I've added Stefan to the
CCs; I'm sure he remembers this code.  It's just 18 years ago.

 (defvar latex-block-body-alist
   '(("enumerate" nil '(latex-insert-item) > _)
     ("itemize" nil '(latex-insert-item) > _)
-    ("table" nil "\\caption{" > - "}" > \n _)
-    ("figure" nil  > _ \n "\\caption{" > _ "}" >))
+    ("table" nil "\\caption{" > (skeleton-read "Caption: ") "}" > \n
+     '(if (and (boundp 'reftex-mode) reftex-mode) (reftex-label "table"))
+     \n _)
+    ("figure" nil  > _ \n "\\caption{" > (skeleton-read "Caption: ") "}" > \n
+     '(if (and (boundp 'reftex-mode) reftex-mode) (reftex-label "table"))))






reply via email to

[Prev in Thread] Current Thread [Next in Thread]