We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In emacs 29, when markdown-get-lang-mode selects a python-ts-mode for python, it would also enable it globally for all *.py files.
markdown-get-lang-mode
python-ts-mode
Steps to produce:
Expected behavior: The xxx.py file is opened with python-mode major mode (which is the default)
python-mode
Actual behavior: The xxx.py file is opened with python-ts-mode.
The reason is that, in emacs 29, running python-ts-mode even for single buffer would modify auto-mode-alist globally: https://github.com/emacs-mirror/emacs/blob/ba2c76fa2bc3aabfda7d1d09cc5148f3f9d8e08e/lisp/progmodes/python.el#L6751
auto-mode-alist
This is also true for almost all other treesit based major modes.
(I think this is a bug in the emacs core. I would file a bug report there too.)
The text was updated successfully, but these errors were encountered:
Update: I reported this to emacs and got a reply: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63463 so apparently that behavior is intended and markdown-mode should not call treesit-based major modes.
markdown-mode
Sorry, something went wrong.
How about f40808f ? Load the language mode only if user sets it in auto-mode-alist.
Look good, thank you for your work!
No branches or pull requests
In emacs 29, when
markdown-get-lang-mode
selects apython-ts-mode
for python, it would also enable it globally for all *.py files.Steps to produce:
Expected behavior: The xxx.py file is opened with
python-mode
major mode (which is the default)Actual behavior: The xxx.py file is opened with
python-ts-mode
.The reason is that, in emacs 29, running
python-ts-mode
even for single buffer would modifyauto-mode-alist
globally: https://github.com/emacs-mirror/emacs/blob/ba2c76fa2bc3aabfda7d1d09cc5148f3f9d8e08e/lisp/progmodes/python.el#L6751This is also true for almost all other treesit based major modes.
(I think this is a bug in the emacs core. I would file a bug report there too.)
The text was updated successfully, but these errors were encountered: