GNU bug report logs -
#76615
14.0.9; error with amsmath style hooks
Previous Next
Reported by: "Paul D. Nelson" <ultrono <at> gmail.com>
Date: Thu, 27 Feb 2025 18:31:02 UTC
Severity: normal
Found in version 14.0.9
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
"Paul D. Nelson" <ultrono <at> gmail.com> writes:
>
> The attached patch addresses the issue for me. Thoughts?
>
Here's a more complete version, addressing related issues. This feels a
bit like plugging a leak with a band-aid, so other suggestions would
also be welcome.
[Message part 2 (text/plain, inline)]
diff --git a/style/amsmath.el b/style/amsmath.el
index 9d6944dc..68cd5983 100644
--- a/style/amsmath.el
+++ b/style/amsmath.el
@@ -163,7 +163,8 @@
(TeX-run-style-hooks "amstext" "amsbsy" "amsopn")
;; RefTeX support: Tell RefTeX about amsmath environments.
- (when (fboundp 'reftex-add-to-label-alist)
+ (when (and (fboundp 'reftex-add-to-label-alist)
+ (buffer-file-name))
(reftex-add-to-label-alist '(AMSTeX)))
;; Add \eqref to `reftex-ref-style-alist' and associate it to `e'
@@ -180,6 +181,7 @@
;; is non-nil
(and LaTeX-reftex-ref-style-auto-activate
(fboundp 'reftex-ref-style-activate)
+ (buffer-file-name)
(reftex-ref-style-activate "AMSmath"))
(when (and (featurep 'font-latex)
diff --git a/style/cleveref.el b/style/cleveref.el
index 129d4ce1..67bece8b 100644
--- a/style/cleveref.el
+++ b/style/cleveref.el
@@ -211,6 +211,7 @@ string."
;; Activate RefTeX reference style.
(and LaTeX-reftex-ref-style-auto-activate
(fboundp 'reftex-ref-style-activate)
+ (buffer-file-name)
(reftex-ref-style-activate "Cleveref")))
TeX-dialect)
diff --git a/style/fancyref.el b/style/fancyref.el
index d2d87bf5..a580fcbf 100644
--- a/style/fancyref.el
+++ b/style/fancyref.el
@@ -103,6 +103,7 @@
;; Activate RefTeX reference style.
(and LaTeX-reftex-ref-style-auto-activate
(fboundp 'reftex-ref-style-activate)
+ (buffer-file-name)
(reftex-ref-style-activate "Fancyref")))
TeX-dialect)
diff --git a/style/hyperref.el b/style/hyperref.el
index 868acd33..e801140b 100644
--- a/style/hyperref.el
+++ b/style/hyperref.el
@@ -343,6 +343,7 @@
;; Activate RefTeX reference style.
(and LaTeX-reftex-ref-style-auto-activate
(fboundp 'reftex-ref-style-activate)
+ (buffer-file-name)
(reftex-ref-style-activate "Hyperref")))
TeX-dialect)
diff --git a/style/refcount.el b/style/refcount.el
index e20ef395..560855c0 100644
--- a/style/refcount.el
+++ b/style/refcount.el
@@ -79,6 +79,7 @@
;; Activate RefTeX reference style
(and LaTeX-reftex-ref-style-auto-activate
(fboundp 'reftex-ref-style-activate)
+ (buffer-file-name)
(reftex-ref-style-activate "Refcount")))
TeX-dialect)
diff --git a/style/varioref.el b/style/varioref.el
index e7f95f7f..b149d4de 100644
--- a/style/varioref.el
+++ b/style/varioref.el
@@ -90,6 +90,7 @@
;; Activate RefTeX reference style.
(and LaTeX-reftex-ref-style-auto-activate
(fboundp 'reftex-ref-style-activate)
+ (buffer-file-name)
(reftex-ref-style-activate "Varioref")))
TeX-dialect)
This bug report was last modified 46 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.