Skip to content
New issue

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

Use magic-fallback-mode-alist instead of magic-mode-alist #60

Merged
merged 1 commit into from Jan 23, 2019
Merged

Use magic-fallback-mode-alist instead of magic-mode-alist #60

merged 1 commit into from Jan 23, 2019

Conversation

kira-bruneau
Copy link

Currently json-mode uses magic-mode-alist for mode detection. This list is prioritized over auto-mode-alist so it causes problems when a file starts with a either { or [ but isn't actually JSON.

Emacs provides magic-fallback-mode-alist which is essentially the same thing as magic-mode-alist, but is checked after auto-mode-alist. In a fresh install of emacs, it's used for detecting things like html/xml, so this seems like it would be a better fit for json-mode.

See Choosing Modes in the emacs manual for more details.

@joshwnj
Copy link
Collaborator

joshwnj commented Jan 23, 2019

Thanks @MetaDark !

@joshwnj joshwnj merged commit 0e819e5 into json-emacs:master Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants