[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e194656c: Let RefTeX recognize labels in user defined environment
From: |
Arash Esbati |
Subject: |
master e194656c: Let RefTeX recognize labels in user defined environments |
Date: |
Thu, 19 May 2022 10:05:13 -0400 (EDT) |
branch: master
commit e194656ce2a689000afb7972f49969465b3e549f
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Let RefTeX recognize labels in user defined environments
* style/listings.el (LaTeX-listings-auto-cleanup): Add user
defined environments to `reftex-label-regexps'.
---
style/listings.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/style/listings.el b/style/listings.el
index cfd49687..93853cba 100644
--- a/style/listings.el
+++ b/style/listings.el
@@ -345,6 +345,16 @@
`((,env ?l "lst:" "~\\ref{%s}"
LaTeX-listings-reftex-label-context-function
(regexp "[Ll]isting")))))
+ (when (boundp 'reftex-label-regexps)
+ (add-to-list (make-local-variable 'reftex-label-regexps)
+ (concat (regexp-quote TeX-esc)
+ "begin[[:space:]]*"
+ (regexp-quote TeX-grop)
+ (regexp-quote env)
+ (regexp-quote TeX-grcl)
+ "[[:space:]]*"
+ (LaTeX-extract-key-value-label nil 1))
+ t))
;; Fontification
(when (and (fboundp 'font-latex-add-keywords)
(eq TeX-install-font-lock 'font-latex-setup))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e194656c: Let RefTeX recognize labels in user defined environments,
Arash Esbati <=