]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix names of TeX-related major-modes
authorArash Esbati <arash@gnu.org>
Wed, 5 Jun 2024 19:37:43 +0000 (21:37 +0200)
committerEshel Yaron <me@eshelyaron.com>
Fri, 7 Jun 2024 10:44:50 +0000 (12:44 +0200)
* lisp/ffap.el (ffap-alist, ffap-string-at-point-mode-alist): Add
entries for mode names introduced in AUCTeX v14.  Use
`plain-tex-mode' for built-in mode.  (bug#71376)

(cherry picked from commit 57c0549c4f99703589279f426a50ae8acab17905)

lisp/ffap.el

index b2b681b7c448161b5ff9bb1e09ee0b45c21c90b0..9fd753fc0e5d0f24735125ed9599f977d52102ea 100644 (file)
@@ -751,8 +751,10 @@ This uses `ffap-file-exists-string', which may try adding suffixes from
     ("\\.\\([chCH]\\|cc\\|hh\\)\\'" . ffap-c-mode) ; stdio.h
     (fortran-mode . ffap-fortran-mode)
     ("\\.[fF]\\'" . ffap-fortran-mode)
-    (tex-mode . ffap-tex-mode)         ; search ffap-tex-path
+    (plain-tex-mode . ffap-tex-mode)    ; search ffap-tex-path
     (latex-mode . ffap-latex-mode)     ; similar
+    (plain-TeX-mode . ffap-tex-mode)    ; AUCTeX v14 counterpart
+    (LaTeX-mode . ffap-latex-mode)      ; ditto
     ("\\.\\(tex\\|sty\\|doc\\|cls\\)\\'" . ffap-tex)
     ("\\.bib\\'" . ffap-bib)           ; search ffap-bib-path
     ("\\`\\." . ffap-home)             ; .emacs, .bashrc, .profile
@@ -1064,7 +1066,10 @@ If a given RFC isn't in these then `ffap-rfc-path' is offered."
     (math-mode ",-:$+<>@-Z_[:lower:]~`" "<" "@>;.,!?`:")
     ;; (La)TeX: don't allow braces
     (latex-mode "--:\\\\$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:")
-    (tex-mode "--:\\\\$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:")
+    (plain-tex-mode "--:\\\\$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:")
+    ;; AUCTeX v14 counterparts:
+    (LaTeX-mode "--:\\\\$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:")
+    (plain-TeX-mode "--:\\\\$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:")
     ;; XML: don't allow angle brackets
     (xml-mode "--:\\\\${}+@-Z_[:alpha:]~*?#" "{<@" "@>;.,!:}")
     (nxml-mode "--:\\\\${}+@-Z_[:alpha:]~*?#" "{<@" "@>;.,!:}")