branch: main
commit 6900e7a34f36d28564c7cd3b9ddceff3ac48fb05
Author: Arash Esbati <[email protected]>
Commit: Arash Esbati <[email protected]>
* style/floatflt.el ("floatflt"): Support RefTeX.
---
style/floatflt.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/style/floatflt.el b/style/floatflt.el
index af0b8918..94807b93 100644
--- a/style/floatflt.el
+++ b/style/floatflt.el
@@ -60,6 +60,15 @@
(setq-local LaTeX-item-regexp
(concat LaTeX-item-regexp "\\|fltd?item\\b")))
+ ;; Tell RefTeX: `reftex-label-alist-builtin' has an entry for
+ ;; "floatingfigure". We only add an entry for "floatingtable" when
+ ;; it's missing. Emacs 31 supports floatflt, floatfig is removed:
+ (when (and (boundp 'reftex-label-alist-builtin)
+ (not (assq 'floatflt reftex-label-alist-builtin))
+ (fboundp 'reftex-add-label-environments))
+ (reftex-add-label-environments
+ '(("floatingtable" ?t nil nil caption))))
+
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))