syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.58k stars 4.9k forks source link

update latex layer to track new AUCTeX naming conventions #16283

Closed dankessler closed 4 months ago

dankessler commented 4 months ago

AUCTeX has changed its naming conventions, e.g., latex-mode is now LaTeX-mode. In order to support both users of the "new" AUCTeX and the "old" AUCTeX, I've configured the keybinding part of the latex layer to configure both old and new version of these modes.

See #16282 for more discussion.

arifer612 commented 4 months ago

Tested out the proposed changes and it works great on lsp v20240215.1823. The changes are backwards compatible too (b^-^)b

dankessler commented 4 months ago

I just noticed that my PR doesn't fix all the latex-related keybinds, e.g., I missed fixing the way reftex keys are bound (which are still only available in actual latex-mode).

I've marked the PR as a draft so I can fix this, re-push, and then I'll mark ready for review.

Rather than littering latex's packages.el file with every more dolists and code duplication, I'm just going to add some logic at the top that figures out whether latex-mode or LaTeX-mode is appropriate, sets some private variables, and then uses those throughout. Hopefully that will still give backwards compatibility while reducing code bloat.

dankessler commented 4 months ago

Upon further reflection, I think this is better fixed upstream in bind-map. I've opened a PR there that should fix (the keybinds part of) #16282 without requiring this PR. I'm going to leave this PR in draft status for now, and if the PR against bind-map is adopted we can scrub it. If the fix can't go into bind-map, then we can revisit a workaround based on this PR.

dankessler commented 4 months ago

This has been fixed (I think?) upstream now