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

ChangeLog.md open by change-log-mode #331

Closed
ncaq opened this issue Apr 24, 2018 · 2 comments
Closed

ChangeLog.md open by change-log-mode #331

ncaq opened this issue Apr 24, 2018 · 2 comments

Comments

@ncaq
Copy link

ncaq commented Apr 24, 2018

I open ChangeLog.md, then major-mode is change-log-mode else markdown-mode.

This problem relation to #127.
I want to remove append of add-to-list arguments.

Expected Behavior

Emacs use markdown-mode.

Actual Behavior

Emacs use change-log-mode.

Steps to Reproduce

  1. open ChangeLog.md

Software Versions

  • Markdown Mode: 2.4-dev
  • Emacs: 25.3.1
  • OS: Gentoo Linux
@ncaq
Copy link
Author

ncaq commented Apr 24, 2018

I wrote workaround over an hour.

(cl-delete-if (lambda (element) (equal (cdr element) 'markdown-mode)) auto-mode-alist)
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))

auto-mode-alist is diffcult…
I think good to markdown-mode add-to-list to first or do not add-to-list.
I want to add-to-list to first.

auto-mode-alist prefer asc element.
So, People who prefer gfm-mode should add elements to auto-mode-alist.
But, add-to-list don't add perfect equal element.
And it don't reorder list.
So, I most use cl-remove-if function.

I did not create pull request because add-to-list append argument is your change.

@jrblevin
Copy link
Owner

jrblevin commented Jul 7, 2018

I have merged the PR from @raxod502 (see b92f00d), so this should be fixed now.

@jrblevin jrblevin closed this as completed Jul 7, 2018
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

No branches or pull requests

2 participants