It seems that the version of AUCTeX currently shipped by doom is broken

What happened?

When I uncommented the latex package from my init.el it completely broke my ability to do M-x, pressing M-x triggered the following error message: “Symbol’s chain of function indirections contains a loop: ConTeXt mode”. M-x only came back after I commented back the latex package and doing a doom sync --rebuild. After searching the internet for a bit I found the exact same bug from earlier in the year here. In the thread they say its a known bug of AUCTeX that has patched in the newer versions, but after doing a doom sync -u && doom upgrade the bug persisted.

Steps to reproduce

  1. Install doom emacs
  2. Uncomment latex fromo init.el
  3. doom sync and doom/reload

System information

This my doom/info

generated  Nov 09, 2024 22:23:35
system     "openSUSE Tumbleweed" Linux 6.11.6-2-default x86_64
emacs      29.4 EMACSDIR=~/.emacs.d/ EMACS=/bin/emacs
doom       3.0.0-pre PROFILE=_default@0 HEAD -> master 6a8c09f01 2024-11-07 02:48:52 -0500 ~/.config/doom/
shell      /bin/zsh
features   ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT
           MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM
           XINPUT2 XPM XWIDGETS GTK3 ZLIB
traits     batch server-running envvar-file custom-file
custom     delete-selection-mode
modules    :config use-package :completion company vertico :ui doom doom-dashboard doom-quit (emoji +unicode) hl-todo modeline neotree ophints (popup
           +defaults) unicode vc-gutter vi-tilde-fringe workspaces :editor (evil +everywhere) file-templates fold snippets :emacs dired electric undo
           vc :term eshell vterm :checkers syntax :tools ansible docker (eval +overlay) lookup magit make pdf tmux :lang agda cc (clojure +lsp)
           common-lisp coq elm emacs-lisp (haskell +lsp) json (java +lsp) javascript julia (latex +lsp +latexmk) lua markdown nix ocaml (org +roam2)
           (python +lsp +conda +pyright) rust scala (scheme +guile) sh yaml :config (default +bindings +smartparens)
elpa       transient spinner sesman queue doom compat