branch: externals/auctex
commit 6900e7a34f36d28564c7cd3b9ddceff3ac48fb05
Author: Arash Esbati <ar...@gnu.org>
Commit: Arash Esbati <ar...@gnu.org>

    * 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 af0b89181b..94807b9321 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))

Reply via email to